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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T20:34:27+00:00 2026-05-11T20:34:27+00:00

I am using a layered architecture with the Entity Framework as my datalayer with

  • 0

I am using a layered architecture with the Entity Framework as my datalayer with a bunch of repositories on top which contain the Linq-To-Entities queries.
The data layer is one project, next to that I have a Services layer and the interface, which is a website.

I want my website to be responsible of specifying the connectionstring for my entity model. How do I do this?

I am using a singleton method to get to my entity repository, which is located inside the datalayer.

Thanks

  • 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-11T20:34:27+00:00Added an answer on May 11, 2026 at 8:34 pm

    You can copy the connection string created in the App.Config of the DAL assembly into the connectionStrings section of the web.config.

    You can keep the connection string in the assembly dll but you shouldn’t deploy it with the website.

    You will need to copy the entire connection string. It should look like this:

    <add name="DataEntities" connectionString="metadata=res://*/DataModel.csdl|res://*/DataModel.ssdl|res://*/DataModel.msl;provider=System.Data.SqlClient;provider connection string=&quot;Data Source=xxx;Initial Catalog=xxx;User Id=xxx;Password=xxx;MultipleActiveResultSets=True&quot;" providerName="System.Data.EntityClient" />
    

    It should include all the information on where the mapping files exist.

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

Sidebar

Related Questions

I am using layered architecture in dotnet (mostly I work on web projects). I
Where should resource files go and at what granularity (application/assembly/namespace/class/...)? Using a layered architecture
I'm currently developing an ASP.NET Human Resources System. I'm using a layered architecture with
My team is building our first significant Silverlight application, using a 3 layered architecture
In a layered architecture, you have a presentation layer, logic layer and data layer.
I have an ASP.NET application that uses a layered architecture e.g. presentation layer, business
In theory in layered architecture you can have multiple modules on the same layer.
I know it probably sounds like very trivial question but I couldn't find any
Just created an acc on SO to ask this :) Assuming this simplified example:

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.