we are using efcore and sql 2016 for our .net core web api. I am evaluating use of temporal tables and its impact on efcore code. when i generate the ef model using cmd line then it generates model with appstart,append and mappings in dbcontext. when i do insert/update they fail saying these columns cannot be updated. I had to remove appstart,end from model and dbcontext mapping to make it work. I read there is no interception capbility yet in efcore like ef6.x. please advise better solution for this.
I tried below options and they are working.
option 1: removed appstart, append fields from entities and dbcontext mappings and updates/insert started working properly.
option 2: decorate period columns with attributes as below.
[DatabaseGenerated(DatabaseGeneratedOption.Computed)]
public DateTime StartTime { get; set; }
[DatabaseGenerated(DatabaseGeneratedOption.Computed)]
public DateTime EndTime { get; set; }