开发者

Are Complex Types in Entity Framework actually inheritance?

I am learning EF and came across the definition of a Complex Type:

"...used to define common properties among various entities."

This sounds exactly like factoring out shared state from a class and moving it into a base class. My question is - is this inheritance from EF's perspective ? I know that inheritance is supported in EF and tha开发者_开发问答t there are 3 ways to acheive it, but Complex Type sounds like it's separate from this. Is it ?

Thanks


No, it's not inheritance. ComplexType is more like a struct. It lumps a bunch of scalar properties together with value semantics.

You can do inheritance in the EF, yes, but nothing can inherit from a ComplexType.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜