I used following article for using custom resources from database.
http://afana.me/post/aspnet-mvc-internationalization-store-strings-in-database-or-xml.aspx I am trying to get a string resource using this code:
string key = "Partner_Key";
string title = new System.Resources.ResourceManager(typeof(MyDBResources)).GetString(key);
But I get error as :
An exception of type 'System.Resources.MissingManifestResourceException' occurred in mscorlib.dll but was not handled in user code
Additional information: Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "MyResources.MyDBResources.resources" was correctly embedded or linked into assembly "[ProjectName]" at compile time, or that all the satellite assemblies required are loadable and fully signed.
The Resource provider code is like:
namespace MyResources {
public class MyDBResources {
private static IResourceProvider resourceProvider = new DbResourceProvider();
public static string Partner_Key {
get {
return (string) resourceProvider.GetResource("Partner_Key", CultureInfo.CurrentUICulture.Name);
}
}
---
}
Other side, the Database resource table has values for all keys.
Any help?