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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T16:34:20+00:00 2026-06-17T16:34:20+00:00

I am using Entity Framework (EF) 5.0, Code First approach, and SQL Server CE

  • 0

I am using Entity Framework (EF) 5.0, Code First approach, and SQL Server CE 4.0 database in my application. However, I am facing a major performance problem on application start-up.

I searched on the Internet and found this article which explains which operations affect start-up performance, and one of them is view generation. So, I looked into how I could generate views at compile time and link them to EF at run-time instead of creating views at run-time. I came across Entity Framework Power Tools which provides a command to generate views through your DbContext class.

I have generated the views at compile time using Entity Framework Power Tools as described in this article. However, when I run my application with SQL Server CE it always generates the following exception:

The mapping and metadata information for EntityContainer ‘DatabaseContext’ no longer matches the information used to create the pre-generated views.

whereas the same application works fine with SQL Server database. So, I searched more but have not found a fix to this problem. Following are links where people have reported similar performance problems:

  1. MSDN Blogs
  2. Entity Framework forum on MSDN

My question is this: “Is there a workaround or solution for this application start-up performance problem?”. I need to use SQL Server CE and not SQL server.

  • 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-17T16:34:22+00:00Added an answer on June 17, 2026 at 4:34 pm

    Actually EF Power tools were generating the view using the default provider SqlClient but, I needed to generate the views for SqlServerCe.4.0 provider which, I was unable to figure out why every time generated views goes out of date and finally I figured out why it was not working.

    So, I just commented the DbContext constructors from my context class and, then I ran the “Generate Views” and “View Entity Data Model XML” command of EF power Tools, then EF Power Tools took the connection string from App.config otherwise it uses a default connection string that connects to Sql Server with SqlClient as provider.

    So, I believe that if anybody uses any other provider like Devart’s Oracle provider etc., then he/she needs to generate the views by specifying the connection string and provider information in App.config (for desktop applications) or web.config (for web applications) and comment out the DbContext constructors (or hide it from EF Power Tools using per-processor).

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

Sidebar

Related Questions

I am successfully creating database (SQL Ce) using Entity Framework Code First approach (C#-WPF).
I'm building a layered application using Entity Framework code first approach with an mvc4
I'm using the Entity Framework 4 code first approach to design my database in
I am using Entity Framework and Code First approach in a WPF MVVM application
Hello everyone my problem is very simple. Using entity framework code first I want
I'm using Entity Framework 4.3 Code First with a custom database initializer like this:
I am creating a new database model using Entity Framework 4.3 Code-FIrst; using Fluent
I'm using Entity Framework 5, and a code first approach. I have a Product
I am trying to update my entity using Entity Framework 4.1 code First approach
I am using the latest Entity Framework with a code-first approach to create a

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.