I have an int
field in my table set to default 0
. I set this field's StoreGeneratedPattern
as Computed
, but I can't change the value of this field after using SaveChanges()
.
I have found this answer on same problem, just wondering if there is any better way to do that.
Edit
here is the edmx generated from database (entity framework 6)
this is the result after adding (from my application) some data to table Intervention
and as you see IsDeleted set to 0 because of IsDeleted int default 0
and
But after trying something like that
db.Interventions.Find(currentInterv).IsDeleted = 1;
db.SaveChanges();
its just didn't work because of StoreGeneratedPattern=Computed