I have generated my data model from database using Entity Framework, but there are some minor style-related things I'd like to change. For example:
public Nullable<int> eventId { get; set; }
this is a part of the generated C# code, and I'd like to, let's say, change the property name to EventId
.
I'm just wondering if doing this in an EF environment is safe, or if it will backfire later and punch me in the face...
If you were to auto-generate the classes again in the future, your changes would be lost. This has happened to me with a production piece of software where I appended a computed property into a generated class:
public string GetOtherProps => $"{this.prop1}, {this.prop2}";
and then referenced that throughout our application.
The classes were regenerated for some reason and suddenly there's hundreds of Unknown Reference Errors
throughout our software.