Is there an ORM that allows a "plugin" to extend the database?

Posted by IP on Stack Overflow See other posts from Stack Overflow or by IP
Published on 2010-05-18T20:27:59Z Indexed on 2010/05/18 20:30 UTC
Read the original article Hit count: 171

Filed under:
|

So, I've been searching for the answer to this, but I can't find anything

I have an Entity Framework Model (MyModel1) - for now, we'll say this contains a "Users" table

It's part of a big app, that has a references to an "Addresses" project

The addresses project contains an Entity Framework Model (MyModel2), this contains a Users table, and an Addresses table (pointing to the same database.

The main app has a control that edits the user, and in that control it has an "addresses" control which actually exists in the "Addresses" project.

To make this work, the User control passes the User object down to the addresses control, however, as the User that's been passed belongs to MyModel1 and not MyModel2, another User object has to be loaded up, then it can be used.

This isn't ideal as I've had to load up the User twice. Is there a way of say, MyModel2 extending MyModel1, which effectively just adds a relationship to "User". Or is there an ORM that would handle this better? Or even a design pattern that would handle this better?

© Stack Overflow or respective owner

Related posts about orm

Related posts about entityframe