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 7085317
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T07:24:35+00:00 2026-05-28T07:24:35+00:00

Its clear to me that I can customize the behavior of syncing models and

  • 0

Its clear to me that I can customize the behavior of syncing models and DB schema process. I am using the DropCreateDatabaseIfModelChanges<> class to do so.

Assume that I have a working project and site and DB is filling in the data. Everything is working fine.

One day I decide that some functionality needs to be changed. The changes will affect the properties of my models (they can be renamed/deleted/added, some models will be new, some models are deleted).

My question: What will happen with the already existing data on my deployed site when I check in all of my changes?

Will I lose it? If so, how can I avoid that?

  • 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-05-28T07:24:36+00:00Added an answer on May 28, 2026 at 7:24 am

    Yes, you will lose your data if your model changes and you are using DropCreateDatabaseIfModelChanges<T>

    To avoid this:

    Don’t use Db initializers in production (maybe except the CreateDatabaseIfNotExists<T>). DB initializes are there to smooth the development experience, not for production use.
    What you need is the new Migration feature of Entity Framework 4.3. (currently in Beta1) which provides features for automatic and code base db schema migration.

    Also now you can set the DB initializer from the *.config file, so you can easily switch beetween the development time DropCreateDatabaseIfModelChanges to no initializer in production configurations.

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

Sidebar

Related Questions

It's clear that you can use numeric characters in SQL table names and use
I hope I can explain my problem in a way that it's clear for
From the MSDN is not really clear its purpose. Can it be used to
I have created a UserControl called AutorControl with a method to clear its textbox:
Can anyone point me to some documentation that makes clear that a 'Future.get` with
I have a JFrame inside of which is a jpanel that im using as
In my application I have robots that the user can give any number of
On my main page I have a sort of side panel that can be
It's clear that Apple has an OpenCL implementation based on Clang and LLVM. There's
As I put together each asp.net page It's clear that most of the time

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.