Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
1
Reply
Call dbfirst migration script through in Entity framework.
Ketan Mokariya
Jan 18 2018 4:39 AM
143
Reply
Hi,
I have developed application based on Asp.net MVC 5 .where I am using entity framework db first approach for my all database creation.
I am building functionality that whenever I publish my application in production environment with empty db it should create db schema when application run for first time.
My current issue is I have my db first migration script with all schemas require in migration folder. If I want to run migration I have to fire command something like 'Update-Database'. But my motive is to run this command or achieve db schema creation through my code on app start event.
Is there any way I can achieve this functionality? Require your help and suggestion.
Thanks,
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
1
)
Next Recommended Forum
Cacading dropdownlist in mvc web api
Conversion failed when converting the varchar value '2018-01