Brian J. Hakim
Brian J. Hakim

Reputation: 993

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.

How to make Concurrency check only for one of this two tables?

Upvotes: 1

Views: 388

Answers (1)

Ladislav Mrnka
Ladislav Mrnka

Reputation: 364409

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.

Upvotes: 2

Related Questions