views:

401

answers:

1

Hi,

How can I use this sample Inheritance and Associations with Entity Framework but using a data type GUID as Condition?

In this sample, I only use Strings and Integers as Condition.

Thanks

+2  A: 

Yes, so long as the GUID is not also a foreign key. Any scalar type is allowed, and GUIDs are scalar, but it is a limitation of the currently shipping version of the Entity Framework that you cannot use a foreign key value as a subtype discriminator field.

Craig Stuntz
But works with Integers! Why don't work with GUIDs?
False premise. Integers and GUIDs are treated exactly the same in this respect.
Craig Stuntz
Ok! Thanks Craig!
I tried, but not worked. Message:Error 2016: Condition can not be specified on member PersonCategory of type Edm.Guid
Then it is probably a navigational property. Like I said, you cannot do that.
Craig Stuntz