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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T11:12:03+00:00 2026-05-24T11:12:03+00:00

I want to perform fast integration (aka desktop integration) tests of a project using

  • 0

I want to perform “fast integration” (aka “desktop integration”) tests of a project using EF 4.0/4.1 connected to SQL Server 2008. This means that I need to swap out the dependency upon SQL Server 2008 with something more light-weight. I will like to swap-in SQL CE 4.0, as executed from mstest or mbunit.

I have already determined how I need to transform the EDMX file to make it compatible with SQL CE 4.0. My intention is to generate the EDMX, for CE use, from a pre-build event in my mstest or mbunit project. But what I need to know is how I convince EF to use my newly generated EDMX file, from within my test project, instead of the production EDMX file? I don’t think it is as simple as changing my connection string.

I suspect the EDMX file is embedded into the built assemblies as a resource, so maybe this question is about how to swap a resource before it gets compiled into a DLL. If, however, I’m going about this incorrectly, I’d just like guidance of how to achieve my goal.

  • 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-24T11:12:04+00:00Added an answer on May 24, 2026 at 11:12 am

    The problem is that EDMX is only design time feature. Having a new EDMX means nothing. EDMX is divided during compilation to three separate files: .ssdl, .msl, .csdl. These files specifies the real mapping (you need to change only .ssdl to swap SQL Server to SQL Server CE). So the simplest way for you is to set up your model to generate files to build directory instead to add them as resources. After that you just need to use modified .ssdl file and same .msl and .csdl files in your test projects (paths to files are part of the connection string).

    Anyway I don’t like that idea. You will do integration tests on different database with different mapping definition = it smells like you will test another application. Integration tests are supposed to be slow so run them against your targeted environment. It is truth that SQL Server and SQL Server CE are very close and replacement for testing should work but still there are differences.

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

Sidebar

Related Questions

I want to use a GPU-accelerated algorithm, to perform a fast and memory saving
In a web project I perform a SELECT SQL query against an Indexed column
The git merge command has an option to perform fast-forward merge, but this is
I am using OpenGL ES to perform drawing in an Android app. I want
I want perform a easy task in android, which when receiving a call the
I want to perform cascade delete for some tables in my database, but I'm
I want to perform some empirical trade-off's to assess the performance of applications written
I want to perform rubyf action in VIM when I press F5 if the
I want to perform simple validation against multiple fields. Please note these fields are
I want to perform a printf() to display when the currently executing code was

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.