开发者

Configure TPH Discriminator column in code first EF 4.1 using attributes

开发者 https://www.devze.com 2023-03-23 04:41 出处:网络
I have a .NET code f开发者_JS百科irst EF 4.1 set of objects that I am configuring with attributes.

I have a .NET code f开发者_JS百科irst EF 4.1 set of objects that I am configuring with attributes.

I would like to rename the column used as the discriminator for my Type-Per-Hierarchy inheritance and also control the values of the discriminator column.

I've seen examples of how to do this with fluent mapping, but since I am using attributes everywhere else, I'd like to be consistent and configure it using attributes. Is this even possible?


It's not possible to do that with attributes.

0

精彩评论

暂无评论...
验证码 换一张
取 消