I think my problem is fairly simple to describe - as I use database first approach using EF - I deffinitely don't want to have any extra code in my Model classes because it disappears when updating database in edmx file (and to be independed of EF).
I do not want also to have in my ViewModel a lots of properties which are the same as in the model therfore I always use complex types such as let say Customer
public partial class Customer
{
public int ID{ get; set; }
public string Name { get; set; }
public string Address { get; set; }
}
public class AddCustomerViewModel:ViewModelBase
{
public Customer Customer
{
get { return customer; }
set { customer = value; RaisePropertyChanged(); }
}
}
How to validate Customer class in ViewModel using IDataErrorInfo and CustomerValidator (FluentValidation Framework) - or in another way using DataAnnotation - without any additional code in Customer model.
Thank you in advance for pointing a way to solve this problem!