TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Rolando Alarcón
NA
1
783
Two Web Apps using the same DB through EF
Mar 18 2016 9:50 AM
Hi,
I've started my first steps on ASP.Net MVC and I've developed a backend App as a dashboard for the application I intend to develop very soon...I coded this backend with EF using the well known "Code First", So after coding my model classes I got my DB generated with no problems...I'm also able to upgrade and downgrade this DB by using migrations too.
Now, I want to develop the front app(a new one) but I need to use some of the models and contexts I use in my other project(my dashboard or admin panel) to interact with...so both apps use the same DB...I will appreciate if you guys bring some light on this...and what's the best choice I have...How do I instantiate the data context which is defined in another project? I also use different solutions...I think I need to redefine my architecture, so I can solve this. I think that as the DB is already created and populated I shouldn't use the code first again in this new app, neither redefine my model classes for mapping this DB, because it already exists. Thanks.
Reply
Answers (
1
)
how can i access variable declared in view in controller
MVC Crud on database table