Model generated with all columns marked as [DatabaseGenerated(DatabaseGeneratedOption.Identity)]

I have a table (Oracle database) with an on insert row trigger initialising the primary key column. When I create a new application the model is generated with all columns attributed with [DatabaseGenerated(DatabaseGeneratedOption.Identity)].

Is there a way to avoid that? Expected result is just the primary key column to be attributed.

Also, the Add page is generated w/o controls. Understandably, because these are not created for identity fields. But removing these attributes from the model does not help as the page is not re-generated. Is there a way to re-generate a page after the model got changed?

You can regenerate the page using “New Page” wizard however if these database fields are identity EF will not allow insert and you will get exception.

That seems to have worked, thanks. As I removed the identity attributes and the related code from OnModelCreating() I no longer get these exceptions.

But it would be nice for the process (as it appears to be clever enough to check for the presence of before insert triggers) to be a bit cleverer and mark only those fields that are actually being initialised in the trigger(s).