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

The Archive Base Latest Questions

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

I generated a database through entity framework. Here is the connection string: <add name=AnnouncementsContainer

  • 0

I generated a database through entity framework. Here is the connection string:

<add name="AnnouncementsContainer" connectionString="metadata=res://*/Models.Announcements.csdl|res://*/Models.Announcements.ssdl|res://*/Models.Announcements.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=.\SQLEXPRESS;attachdbfilename=|DataDirectory|\Database.mdf;integrated security=True;user instance=True;multipleactiveresultsets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" />

This uses a file called Database.mdf. The application runs fine but there are two issues that I am having to deal with right now:

  • Database Updates: Whenever I update the database using raw sql code I have to manually host this file myself in SQL Server Management Studio (I then detach the database and leave the rest to visual studio). The server appears in the Visual Studio server explorer but Visual Studio cannot connect to it to run SQL code. Where is Visual Studio hosting this file so that the application can get to the database but the IDE can’t?
  • Profiling: I have created some stored procedures for entity framework and mapped them to the entities. It would be really nice to see if these entities are actually being executed. How can I see the stored procedures executing with a tool like SQL Profiler?

Here are some screenshots in case what I am saying isn’t clear:

SQL Server Management Studio:

SQL Server Management Studio

Visual Studio Server Explorer:

Visual Studio Server Explorer

  • 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-23T19:49:16+00:00Added an answer on May 23, 2026 at 7:49 pm

    As you see your connectionstring contains this part:

    data source=.\SQLEXPRESS;attachdbfilename=|DataDirectory|\Database.mdf;
    

    This means that it will take the file Database.mdf stored in your |DataDirectory| (which defaults to App_Data folder in web projects) and it will attach it dinamically to the provided sqlexpress instance (in this case .\sqlexpress which means the sqlexpress instance running on localhost .\ named sqlexpress.

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

Sidebar

Related Questions

I use auto generated Entity-Framework Data Model for a Database that has 100+ tables.
I'm using Entity Framework Code First to generated my database, so I have an
I've got two lists of Customer objects, generated from Entity Framework. I need to
I have my domain split into multiple Entity Framework models. I have some shared
I have an Entity Framework model that was generated by the Visual Studio 2008
I made an Entity database and it generated all the tables but it seems
When using Grails 1.1 together with a MySQL the charsets of the auto-generated database
I have a database file that is generated on a PC using Sqlite. This
I have a database that I would like class files generated from, and also
The table names in my mysql database are dynamically generated. Is there some way

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.