resourceproviderfactory

Custom ResourceProviderFactory Dependency Injection

喜你入骨 提交于 2019-12-17 16:37:17
问题 Is there anywhere in ASP.NET MVC where you can get a reference to the ResourceProviderFactory that is instantiated in order to perform Property Injection to add a custom DB Implementation to retrieve the resources from? I have a custom resource provider being loaded but I wanted to know whether there was an alternative to using a Static DI container to inject the dependency within the Provider. Similar to how you can inject for the Role and Membership providers in MVC. 回答1: The trick is to

.NET MVC Localization (resourceprovider) implementation not working correctly

江枫思渺然 提交于 2019-12-11 05:27:53
问题 i'm currently implementing a localized website. I've created a custom ResourceProvider + Factory for storing resources in a database. This all works, i'm storing data as follows: resourceid | url (null) | type (null) | name | culture (null) | value 1 | NULL | Common | Test | NULL | Hi 2 | ~/Views/Products/Index.aspx | NULL | Products | NULL | Products I've stored a Global (Test) and a Local (Products) resource in the above sample if i'm correct? I'm using this implementation of

Custom ResourceProviderFactory Dependency Injection

爱⌒轻易说出口 提交于 2019-11-28 00:04:07
Is there anywhere in ASP.NET MVC where you can get a reference to the ResourceProviderFactory that is instantiated in order to perform Property Injection to add a custom DB Implementation to retrieve the resources from? I have a custom resource provider being loaded but I wanted to know whether there was an alternative to using a Static DI container to inject the dependency within the Provider. Similar to how you can inject for the Role and Membership providers in MVC. The trick is to implement an infrastructure component calls into MVC's DependencyResolver.Current , so you can register the