You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there a way to change a property of an entity to read-only during scaffolding?
Change public bool Field { get; set;} to public bool Field { get; private set;}
The text was updated successfully, but these errors were encountered:
To be honest, I do not remember what I was trying to accomplish back then. I think I was trying to set certain properties of a table/entity to be read-only(private setter), as the property was going to be obsoleted for updating soon, but still needed to read it. This way it could be populated from database, but code could not update it.
Is there a way to change a property of an entity to read-only during scaffolding?
Change
public bool Field { get; set;}
topublic bool Field { get; private set;}
The text was updated successfully, but these errors were encountered: