views:

50

answers:

1

Hi,

it's possible to have one entity object (class, e.g. User) for more entity models (EDMX)? I have two datamodels in which i want to share user tables.

+2  A: 

Are you using auto-generated code?

One workaround I came up with for a similar scenario was to create an interface from the generated code and add the interface to the appropriate classes. Would that work for you?

serialhobbyist
Yes im using auto-generated code. But if i update database model, the interface definition in object user will be erased. In any case is it a good idea. Thanks
Jan Remunda
Yes, that's the problem - that's why I asked about the auto-generated code. You'd still have your interface and your code won't build so it'll be easy to track down. Probably worth commenting the interface to that effect, though, in case someone else to mop up in a couple of years. Don't want them hating you.
serialhobbyist