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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T03:24:15+00:00 2026-05-23T03:24:15+00:00

Yesterday, I decided to convert my application from LINQ-to-SQL to EF4 to take advantage

  • 0

Yesterday, I decided to convert my application from LINQ-to-SQL to EF4 to take advantage of the code-first feature. I created my POCOs, a DbContext class, implemented new repositories classes and all was fine.

At some later point, I noticed that there was a typo in the filename EF used to create the SqlExpress MDF file. I moved the old DB out of its folder, cleared connection strings out of my config files, and let EF create a new, empty DB. It created the file, added a connection string to my app.config file, and the application works fine. However, when I look in the folder specified in the connection string, there is no MDF present. In fact, the folder doesn’t even exist. Here is the connection string that EF added:

<add name="PhotoAlbum.Infrastructure.Properties.Settings.PhotoAlbumConnectionString"
            connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=&quot;C:\Src\Visual Studio 2010\Projects\PhotoAlbum\trunk\PhotoAlbum.Web\App_Data\PhotoAlbum.mdf&quot;;Integrated Security=True;User Instance=True"
            providerName="System.Data.SqlClient" />

Seeing that EF decided to put the file on C: instead of D: (where the folder does exist, but the file doesn’t), I changed the connection string to:

<add name="PhotoAlbum.Infrastructure.Properties.Settings.PhotoAlbumConnectionStringg"
            connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=&quot;D:\Src\Visual Studio 2010\Projects\PhotoAlbum\trunk\PhotoAlbum.Web\App_Data\PhotoAlbum.mdf&quot;;Integrated Security=True;User Instance=True"
            providerName="System.Data.SqlClient" />

EF did not create a new file, or try to open an existing file, on the D: drive. This apparently makes no difference to EF, because it still is able to access this phantom MDF file.

I’ve searched my entire computer and there is no PhotoAlbum.mdf file anywhere on my system. Where has this file gone? Why can EF find it, but I can’t?

  • 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-23T03:24:16+00:00Added an answer on May 23, 2026 at 3:24 am

    This seems to only have been an issue with the CTP version of EF. The SQL CE files are showing up now.

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

Sidebar

Related Questions

I had some issues with a different ODM yesterday so I decided to take
Started learning javascript yesterday at CodeAcademy and decided I could actually write code. Just
Yesterday, after about two years we re-deployed our application. Code hasn't changed, but the
Yesterday I watched the screencast Writing your first Rx Application (on Channel 9) where
Yesterday, I discovered the Subversion (SVN) blame feature, and I was wondering, is this
Yesterday, I found myself writing code like this: SomeStruct getSomeStruct() { SomeStruct input; cin
Yesterday I got a call from a Microsoft representative asking if we supply hosted
Yesterday, I decided to install the newest NCover version (3.4.2). However, when I ran
Yesterday I added a custom MembershipProvider to an ASP.NET web application, but when I
So at work yesterday, I had to write an application to count the pages

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.