I use the Model Designer of Visual Studio to generate my object classes. Now I want to adjust the generated classes with inheritance and getter/setter changes.
If the Model Designer for example has created the class Browser:
public partial class Browser
{
public Browser(){}
public int Id { get; set; }
public string Name { get; set; }
}
I want to adjust the generated code to
public partial class Browser : ValidatableModel, IFormattable
{
public string name;
public Browser(){ name = "" }
public Guid Id { get; private set; }
public string Name
{
get { return name; }
set { SetPropertyAndValidate(ref name, value); }
}
}
I'm using the WPF Application Framework which is implementing the database in another way than I want to.
Do you know a solution for this or any other approach to use Model First approach in WPF? I think there has to be one.