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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T13:22:15+00:00 2026-06-01T13:22:15+00:00

I recently started a new personal project to learn Entity Framework. My end goal

  • 0

I recently started a new personal project to learn Entity Framework. My end goal is to make a desktop game that uses SQL compact for data management and uses Entity Framework for the game objects. Not actually knowing there were multiple ways to start EF (model first, code first, db first) I went with the most obvious choice of model first.

I’ve been working with it successfully now, however one thing concerns me, especially post-development. My goal with the game is that users can update to the latest version without losing any of their existing data. The current issue is that all the generation scripts are destructive by nature (dropping everything then recreating it) – that means I can’t run those against the user SQLCE DBs out in “production”, so I need to come up with an alternative plan of action.

That said, does anyone have recommended solutions on best practices? In previous desktop apps, I’ve traditionally used XML/binary to store data, which allows me to easily update the “schema” without affecting existing data (versioning in the app tailors the Load() according to the version, while the Save() always saves in the latest version).

What are some recommendations on handling this problem using SQLCE?

  • 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-01T13:22:16+00:00Added an answer on June 1, 2026 at 1:22 pm

    What you need, if understood right, is to utilize migrations which come with EF. Since the question is general this link should best guide you to what you need I think…

    http://blogs.msdn.com/b/adonet/archive/2012/02/09/ef-4-3-code-based-migrations-walkthrough.aspx

    With migrations which you can tailor manually if needed (and come in the shape of code which is applied at each point of change, incrementally) and you can also supply your ‘seeding’ if required.
    i.e. you should be able to do most of what you require, delete, remove old incompatible data – and seed the new one that you have – and all related to a particular migration step you have.

    How would that work with your app deployment specifically, that’s a bit more complex I guess, but this should get you started, and then with each db version-breaking change your new code update would contain all the migrations since the previous update (or just one usually is enough, i.e. make it be one with each update) and the code to tear-down or create new things.

    hope this helps,

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

Sidebar

Related Questions

I just recently started a new personal project, with a goal of having it
I've recently started my new private project. The main goal which I want to
I have recently started a new C++ project and I intend to make it
I recently started a new position at a company that uses IBM's WebSphere Portal,
I am quite new to the Entity Framework, and only have recently started looking
I've recently started a new project in C#, and, as I was coding some
I have recently started a new job and noticed that all the SQL tables
I've recently started a new web development project for an embedded device and wanted
I'm new to PHP and I recently started learning Zend Framework. What DAL are
I recently started a new project using iOS 5 with UIStoryBoards (awesome feature;)). Especially

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.