views:

984

answers:

1

Hi All

I'm working on proof of concept application like crm and i need your some advice. My application's data layer completely dynamic and run onto EF 3.5. When the user update the entity, change relation or add new column to the database, first i'm planning make for these with custom classes. After I rebuild my database model layer with new changes during the application runtime. And my model layer tie with tightly coupled to my project for easy reflecting model layer changes (It connected to my project via interfaces and loading onto to application domain in the runtime).

I need to create dynamic entities, create entity relations and modify them during the runtime after that i need to create change database script for updating database schema. I know ADO.NET team says "we will be able to provide this property in EF 4.0", but i don't need to wait for them.

How can i update database changes during the runtime via EF 3.5 ?

For example, i need to create new entity or need to change some entity schema, add new properties or change property types after than how can apply these changes on the physical database schema ?

Any ideas ?

A: 

This blog post may have what you need. It describes a way to capture the metadata of your model and modify it in-transit, during runtime. I haven't a clue how it works, but it sounds cool.

Changing Entity Framework storage DB schema during Runtime http://blogs.microsoft.co.il/blogs/idof/archive/2008/08/22/change-entity-framework-storage-db-schema-in-runtime.aspx

Robert Harvey
Hi Robert,Thank you for your response, but i already use similar approach on my project also i have used EDM Tools classes library for dynamically build my model layer, after that i have executed this loosly coupled model layer via Interface. Actually i have solution for creating and updating model layer from database during the runtime, i need to update database schema from model layer or like this.
fyasar
I found EDM Tools source from ADO.Net team blog : http://blogs.msdn.com/adonet/archive/2008/06/20/edm-tools-options-part-1-of-4.aspx
fyasar

related questions