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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T13:57:00+00:00 2026-05-16T13:57:00+00:00

Scenario Data Access Layer EF’s generated .edmx and classes Used only to access the

  • 0

Scenario

Data Access Layer

  • EF’s generated .edmx and classes
  • Used only to access the SQL Database and pass the data forward to the business layer

Business Layer

  • Business entities : contain all validation logic, marked with the [DataContract] attribute so that they can be passed as parameters to my web service

Problem

I want to use the repository pattern with this approach. The repository would contain all CRUD operations to be performed on the database, accepting and returning business layer entities. This means that the repository will reside in the business layer, because only the business layer can reference the data layer, not the other way round. I’m also planning to use the data layer assembly in other projects, that’s why I would like to have the repository in the data layer, not the business layer (which is particular for this project).

What do you recommend? Should I keep the repository in the business layer and write one for each different business layer? Or should I keep the repository inside the data layer, not accepting or returning business entities.

Or, as an alternative, can anyone recommend a different approach, that would yield a more logical, scalable architecture?

Thanks for reading, waiting for answers

  • 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-16T13:57:01+00:00Added an answer on May 16, 2026 at 1:57 pm

    A repository is an abstraction over the data layer – to afford persistence ignorance to your application. It should only deal with data access and nothing more. It should not have any business logic.

    The repository can and should accept and return DTOs (Data Transfer Objects) – these are simple objects that do not have behavior of their own and are used to transfer data between layers.

    I would put it between the DAL and the BLL and only use it for data access from the BLL.

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

Sidebar

Related Questions

How can i pass the different types of errors from Data access layer to
Consider a web application with business layer and data access layer. So, every request
I would like to develop a database independent data access layer for my web
Assume the following scenario: All data are in Sql Server tables. 1) An Execute
I have the following scenario: I have various user's data stored in my database.
I have a data access layer represented by an Eclipse project. I use Hibernate
Is the TransactionScope can be used only for Database/ADO.NET related methods? Say, I have
We use SQL Server 2005. All our data access is done through stored procedures.
We have our Data Access Layer setup to use repositories, services, and specifications (for
I have the scenario where the data from a single table must be in

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.