1

I've two tables named Modules and Privileges which are related by a foreign key relationship as shown below:

alt text
(source: baburajpb at sites.google.com)

I'd like to model Module and Privilege by adding ModuleName to Privilege. Later I'd be interested in creating a derived class (Menu in the illustration) from Privilege by adding a discriminating condition on ModuleName. Is this possible using Entity Framework?

Glorfindel
  • 21,988
  • 13
  • 81
  • 109
Raj
  • 4,405
  • 13
  • 59
  • 74

1 Answers1

1

Can you map multiple tables to a single entity type? Sure, that is supported. However, you cannot use a mapped field of the table (ModuleName) as a discriminator column for table per hierarchy mapping. The discriminator column must be used as a discriminator alone, and must not be mapped into your client schema.

Craig Stuntz
  • 125,891
  • 12
  • 252
  • 273