I am working on a project with MVVM and WPF.
It happens that I need to tweak the DbContext template to achieve some features that will prevent a lot of headaches

First, I would libe being able to add in head of each model something like:
Code: Select all
public const string Entity = "Entity";
Code: Select all
resource.Localization.Get(Model.Entity);
Code: Select all
public const IdProperty = "Id";
public Guid Id{get;set;}
For properties that would have a max or min lenght, I would like to have it also as constants, so I can use it for validation and some business rules outside of model:
Code: Select all
public const int Code_MinLength = 3;
public const int Code_MaxLength = 7;
public int Code{get;set;}
Can you help me?
Thanks