I have an auto generated partial class in my Model folder with lots of properties and I need to modify some of the setters in these properties(annotate property).
To ensure that I don't repeat myself in the future(after a refresh) I have another partial class with the same properties by use of attributes, where these properties cannot be modified, only via provided attributes.
So I have built a custom attribute class to modify those properties. But this seems more abusive than useful, so how can I annotate the properties that I want that it's also a DRY and clean code?
public partial class Stud <---- Extended partial class
{
public string Property2 <---- This does not work!
{
get {return Property2;}
set {Property2 = Property2.Trim();}
}
}