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

  • Home
  • SEARCH
  • 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 6534049
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T10:12:14+00:00 2026-05-25T10:12:14+00:00

Im creating a database via a code first application, the sql server contains no

  • 0
  1. Im creating a database via a “code first” application, the sql server contains no databases.
    The application runs fine, creates the database and seeds the data i have defined in my initializer.

  2. a service i have running tries to add some data to the database for the first time. i get the error:

The model backing the ‘yyyContext’ context has changed since the database was created. Either manually delete/update the database, or call Database.SetInitializer with an IDatabaseInitializer instance. For example, the DropCreateDatabaseIfModelChanges strategy will automatically delete and recreate the database, and optionally seed it with new data.

There should be no changes since the database was created and when then service runs.

I’m running EF4.1, and the database doesn’t exist so unlike questions with similar titles:

Database.SetInitializer<YourContext>(null);

Isn’t the solution for me.

Any ideas about what could be wrong are welcome.

  • 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-25T10:12:14+00:00Added an answer on May 25, 2026 at 10:12 am

    Doh! moment, turns out the service wasnt using the same connectionstring as the other app.
    the reason the databases didnt look the same must be because earlier in development i started the main app with no connectionstring aswell, so it provisioned a local instance database for itself to use.

    Then later when i was trying to use the service, it was trying to access the same database from earlier, and the model changed significantly since then.

    I pointed the connectionstring to the correct database and everything worked from there.

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

Sidebar

Related Questions

I am creating a database in SQL Server 2005 and cannot remember the CREATE
Situation I'm creating a C#/WPF 4 application using a SQL Compact Edition database as
I'm creating a database application using ASP.NET and I want to make a Windows
I copied a SQL Server database from one system to the next, identical setup,
Given a SQL Server database that uses uniqueidentifiers as primary key fields for the
I am trying to retrieve data from MySQL for a flash application via PHP,
I'm creating an android app that is exchanging data with a web app via
Using Entity Designer in VS2010 to build a database for SQL Server 2005. Having
When creating database tables I'm often stumped when trying to name my time/date/timestamp fields.
I am creating database at runtime and I want to create the tables in

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.