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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T20:58:46+00:00 2026-05-23T20:58:46+00:00

I currently working on a application that use Entity Framework 4.1 (code first) and

  • 0

I currently working on a application that use Entity Framework 4.1 (code first) and SQL Server CE 4.0. One of the new things I really like from SQL Server CE 4.0 are the computed values.

But I have some performance problem while importing old data into my new data store system (around 50000 entries). This is my second implementation for this. The first version used Entity Framework 4.0 and SQL Server CE 3.5. But there is a huge performance difference between these implementations. The code first implementation takes around one hour to import the entries, the other implementation only some minutes.

The most time is spend in the SaveChanges method. I tracked the problem down to the [DatabaseGenerated(DatabaseGeneratedOption.Identity)] attribute. If I use [DatabaseGenerated(DatabaseGeneratedOption.None)] and implement my own generation of keys (as a simple workaround) the performance is back on the level of the first implementation.

Is this a known problem? Is there any way to solve this performance problem? Or is generating my own keys the way to go?

  • 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-23T20:58:47+00:00Added an answer on May 23, 2026 at 8:58 pm

    I decided to go the “generate my own key” way as a workaround. I added the required features for key generation to my DBContext class.

    If Microsoft change something on this behavior, I switch back to auto generation.

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

Sidebar

Related Questions

We are currently working on an application that will use a WCF service. The
I am currently working on an web application that uses ASP.NET 2.0 framework. I
I'm currently working on an application that needs to use Windows and Forms authentication
I am currently working on an application that makes use of a MapView and
I am currently working on code that serializes in one app (C++) and needs
In an application that I am currently working on, a requirement is to bring
A database application that I'm currently working on, stores all sorts of settings in
I am currently working on a web application that uses PHP and MySQL, but
I'm working on a PyGTK/glade application that currently has 16 windows/dialogs and is about
The application I am currently working on generates a lot of SQL inline queries.

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.