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
    Aug 1, 2016 at 5:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.