Search code examples
c#modelresx

resx location relative to model classes


What's the recommended strategy for storing resource files that are used by data annotations in a model project? For example by the resourcetype property of the displayattribute.

Should these resource files be stored in the same project as the model classes or contained separately elsewhere?

I am just wondering if they should be stored elsewhere to allow the resource files to be updated without recompiling the model project.


Solution

  • We currently store them in the same project. I'm not even sure if you can store local resources in a different project.

    If you think you need to change your resources regularly, I would recommend to use another resource provider, for example a DB resource provider.