views:

33

answers:

1

Hi,

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 that there are 3 ways to acheive it, but Complex Type sounds like it's separate from this. Is it ?

Thanks

+1  A: 

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.

Craig Stuntz
Thanks Craig! That clears it up for me.
Scott Davies