Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8336459
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T03:59:51+00:00 2026-06-09T03:59:51+00:00

In EF projects, Is there any best practice for setting AutomaticMigrationsEnabled ? More declaration:

  • 0

In EF projects, Is there any best practice for setting AutomaticMigrationsEnabled ?

More declaration:

In our team after modifying a model we usually run “add-migration” and “update-databse” commands in Package Manager Console. This error raises when other developers run the project:

“Can not drop database because it is in use”

Every time this happen the first modifier should Check In whole project and others have to GET modified objects. In many cases we don’t want to check in the already created model and migration!

This situation is annoying,are there any solution for this kind of problems.
thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T03:59:52+00:00Added an answer on June 9, 2026 at 3:59 am

    Automatic migrations do all the magic for you but they don’t allow strict versioning (you don’t have special fixed migration for each version). Without strict versioning you cannot track version of your database and you cannot do explicit upgrades (you cannot do downgrades at all).

    If you don’t plan to use versioning where you need to know what version the database is and if you don’t plan to use downgrading you can simply use automatic migration.

    “Can not drop database because it is in use”

    It looks like you are working on the shared database = show stopper. Each developer should use his own database.

    but don’t want to checkout the model and migration that was already created!

    That is a best practice and if you want to continue with code based migrations you will have to follow it. Btw. there is a practice called “continuous integration” – in continuous integration you should get immediately after the commit is successfully built and passes tests.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I wonder if there is any best practice for junit testing of Solr 3.6.
Are there any open source projects or part of codes using which its possible
Is there any way to change settings for multiple projects in a Visual Studio
Are there any tools which generate a project layout for python specific projects, much
Simple question. Are there any tools for generating Xcode projects from the command line?
If I have an existing solution containing multiple c# projects, are there any static
What is the best practice method of sharing multiple dependencies across Maven projects. I
What are the best practices for setting up projects with multiple interfaces in asp.net
Are there any guidelines / best practices on developing a class library (custom internal
Are there any admins out there who use WLST? On our project we are

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.