I am recently developing multi-tents cloud application that can help to generate classes and dbcontext dynamically for other ASP MVC projects. How can I do this task from my application to another projects with updating the DB for the new projects. enter image description here
1 Answer 1
Add your EF database model in a separate project, e.g. MyProj.Data
. Then add a reference to it from the others. When you update the schema you only need to re-generate MyProj.Data
once rather than a separate copy in all the others.
-
Can't do that , the model is dynamic, i have no idea about what the user will create. The user will fill the form in my application and then my application task is to generate classes and update the user's db, my application will update the user's db depend on the EF code first.Kerlis– Kerlis2016年08月01日 05:08:18 +00:00Commented Aug 1, 2016 at 5:08
Explore related questions
See similar questions with these tags.