Timestamp attribute marks concurrency tracking fields which should not be displayed on Index, Details, or Delete views or be editable on Edit views.
/cc: @Rick-Anderson
There's a sample to not show these things by using an attribute, @prafullbhosale can you give that to @tdykstra ?
Currently there is an attribute ScaffoldColumn which is used to inform scaffolding to ignore the fields.
If the property is decorated with [ScaffoldColumn(false)], that property is not displayed on any of the pages.
@divega should we consider making this scaffolder as smart as the MVC5/EF6 one that detected Timestamp (rowversion) fields fields shouldn't be scaffolded ?
Just in case, these fields do need to round-trip, but they just don't need to be visible in the UI. I think how it is solved is a matter of layering, e.g. can the scaffolding code reason about EF metadata for the property or does it need to decide based on reflection only?
Scaffolding does look into the IEntityType for the model.
So is the intent here that scaffolding needs to have a way to let users specify certain properties need to round-trip, without being displayed on pages?
For Timestamp attributed properties the ideal behavior would be no display on any page and round-trip on edit and delete pages.
Removing from milestone because this milestone already shipped.
For now the recommended approach is to use the scaffoldcolumn attribute. Closing.
Most helpful comment
For Timestamp attributed properties the ideal behavior would be no display on any page and round-trip on edit and delete pages.