Entity Framework map multiple tables to one entity. Concurrency check
I got one entity mapped to two tables. First of this tables has timestamp field. What I want - if I modify field from first table it should check first table for concurrecny with timestamp column. The second table should'n updating. If I modify second table it should just update the second table. First table must be unchanged.
This is work if I set "Concurrecny=None" for the timestamp field in schema. If I set "Concurrecny=Fixed" for the timestamp field and change properties from the second table it update the first table with current values.
开发者_如何学JAVAHow to make Concurrency check only for one of this two tables?
That is not possible. Once you map two tables to single entity they becomes one for entity framework and the time stamp is shared among them so if you do any changes to the second EF will always modify timestamp in the first. If you set Concurrency
to None
you are turning off the concurrency feature in EF and the main purpose of timestamp field.
精彩评论