How to dynamically change fields in an .NET ORM

Posted by rsteckly on Stack Overflow See other posts from Stack Overflow or by rsteckly
Published on 2010-05-06T22:54:16Z Indexed on 2010/05/06 22:58 UTC
Read the original article Hit count: 205

Filed under:
|

I'm working in ASP.NET in an application where often users want to add fields or change field names.

I'd like to be able to have an xml schema in place that is parsed and a dynamic object model created from it that can be accessed throughout the application.

My initial reaction is that this is not realistic. I think there is flexibility about the dynamic nature of it. I think the people I'm trying to build this for wouldn't mind recompiling.

Even if the app recompiled, I don't know how to abstract away enough in my code access the data to allow for users changing property names, etc. How can you write LINQ when the properties might change?

In short, there's two questions here: 1) is there a way to dynamically generate an object model of the database and 2) is there a way to abstract away enough so that code accessing the database doesn't break when properties change?

© Stack Overflow or respective owner

Related posts about .NET

Related posts about orm