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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T10:34:05+00:00 2026-06-05T10:34:05+00:00

I am using ADO.NET, I have created DAL and BAL, structure is as follows

  • 0

I am using ADO.NET, I have created DAL and BAL, structure is as follows

DAL
   -POCO(Table to Entities mapping)
   -Repository (Add, Delete, Edit, Select, Search)

BAL
   -POCO(DAL to Entities mapping where Entities are complex type here)
   -BusinessManager(Validation and Business rules)

I will be exposing BAL using services. And multiple applications like Web, Window, Mobile will be consuming this BAL.

I am not sure where should Sql Transactions be started. Who is responsible for creating a complex entities.

e.g. Complex entity could be

   Entity
     -Entity Type
     -Contacts
     -EmployeesReporting
     -ReportingTo

Now who should create an Entity? Is it a BAL or DAL. Where should SqlTransactions be started? How should I make these entities to support lazy loading as I am a supporter of Stored procedure and prefers to use one database connection per request

  • 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-06-05T10:34:06+00:00Added an answer on June 5, 2026 at 10:34 am

    I’m not sure I see how your desire to use one database connection per request fits with your desire to support lazy loading.

    The point of lazy loading is that you don’t need to materialize certain parts of the object graph when initially loading it, and you may or may not need to load those parts at some later point in program execution.

    Reserving a connection somehow to satisfy that need would be very wasteful of a precious resource (DB connections).

    Since the object graph is being used in the Business Access Layer, parts of the object graph that were not initially materialized must somehow be represented in a manner that allows you to intercept requests to have them available, and produce them on demand. The EF solution of placing a proxy in the business layer that, in turn, activates the DAL to fetch missing parts of the object graph on demand, is a good one.

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

Sidebar

Related Questions

I'm using Microsoft Sync framework 1.0 (without ADO.NET services) I have created 2 custom
I have an OData WCF ADO.NET service created with Entity Framework using protocol version
I am trying to develop an application using ADO.NET. I have two tables in
I have an app using the ADO.NET entity framework (the VS2008 version, not the
how can I by using Ado.net rename existing column in a table and changing
I am stating out with entity framework. I have created my ADO.NET Entity Model
I'm building an ASP.NET MVC site using the ADO.NET Entity Framework. I have an
I have a C# application, using ADO.Net to connect to MSSQL I need to
I have some existing code that retrieves data from a database using ADO.NET that
I have a problem connecting to Informix server(windows) using ADO.NET. I'm using Listing 1

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.