Page 1 of 1

Mapping an xmin column using EF 5 Code First migrations

Posted: Fri 30 Aug 2013 04:28
by jonsagara
According to this thread, you support mapping to a table's xmin column using Entity Developer. I presume this works because you're pointing at an existing database.

Is it possible to map to xmin using Code First Migrations? How would you prevent the migrations from trying to create an xmin column instead of mapping to the xmin system column?

Thank you,

Jon

Re: Mapping an xmin column using EF 5 Code First migrations

Posted: Thu 26 Sep 2013 13:54
by Shalex
jonsagara wrote:How would you prevent the migrations from trying to create an xmin column instead of mapping to the xmin system column?
1. The name of the xmin StorageColumn in SSDL should be exactly the same as the name of the corresponding system column ("xmin").
2. You should use non-automatic code-based migrations. After migration is generated, open it and comment the line which creates the xmin column.

We have just sent a test project with the detailed steps to the e-mail address you specified in your profile. If you did not receive it, specify here an alternative e-mail.

Sorry for the delay.