Mapping multiple entities to one table

c# entity-framework entity-framework-6 mapping

Question

I have an object in my application called Customer that maps to Customers. Right now, everything is operating well.

We want to use our present project as an example for a different customer project. The Customer table in the client project also includes a few more columns. When adding a second Customer object to the client project, the error "both kinds have simple names" is raised.

Can inheritance be used to resolve this. Or does EF permit the creation of classes with various names that map to the same database, such as Customer and CustomerClient, which both map to the Customer table but vary in that CustomerClient has extra fields added?

Edit: Once I get to work, I'll attempt to offer the code.

1
0
9/30/2016 1:46:25 AM

Accepted Answer

ZZZ_tmp
0
9/30/2016 7:28:07 PM


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow