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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T23:48:48+00:00 2026-06-06T23:48:48+00:00

I am using ASP.NET Web Forms/C# . I researched about implementing BLL and DLL

  • 0

I am using ASP.NET Web Forms/C#.

I researched about implementing BLL and DLL in my application.

I found out that many say that using Linq To SQL replaces DAL itself.

So you should be accessing Data and implementing Business Logic inside the BLL class itself.Not sure if it is correct.

Currently I have a class CustomerBLL.I am accessing the data and implementing Business Logic inside it.

So my question is,is it a good approach?

Can I follow this?

Also currently I have only one BLL class , should I use only one or one per .aspx page or group similar pages together.

Here is my CustomerBLL.cs(Just including few functions).

namespace CwizBankApp
{
    public class CustomerBLL
    {
        public string GetDateFormat()
        {
            using (var db = new DataClasses1DataContext())
            {
                var format = db.CODEs.Where(code => code.NAME.Equals("dateformat")).Select(code=>code.DRNAME) .SingleOrDefault();  
                return format;   
            }
        }

        public IList<string> GetAccountTypes()
        {
            using (var db = new DataClasses1DataContext())
            {
                var  acctype = db.mem_types.Select(account=>account.CustCategory).Distinct().ToList();
                return acctype;
            }
        }




        public IList<mem_city> GetCities(int index)
        {
            using (var db = new DataClasses1DataContext())
            {
                var city = db.mem_cities.Where(c => c.state_id.Equals(index)).ToList();
                return city;
            }
        }

        public string InsertDate(string datefield,string dateFormat)
        {
            string dd, mm, yyyy;
            string date;
            string [] split = Regex.Split(datefield, @"/");
            yyyy = split[2];
            if (dateFormat.Equals("British"))
            {
                dd = split[0];
                mm = split[1];
            }
           else
            {
                dd = split[1];
                mm = split[0];
            }

            date = mm.PadLeft(2, '0') + "/" + dd.PadLeft(2, '0') + "/" + yyyy;  
            return date;
        }

        public string RetrieveDate(string datefield,string dateFormat)
        {
            string dd, mm, yyyy;
            string date;
            string [] split = Regex.Split(datefield, @"/");
            dd = split[1];
            mm = split[0];
            yyyy = split[2];

            if (dateFormat == "British")
            {
                date = dd.PadLeft(2, '0') + "/" + mm.PadLeft(2, '0') + "/" + yyyy;   
            }
            else
            {
                date = mm.PadLeft(2, '0') + "/" + dd.PadLeft(2, '0') + "/" + yyyy;   
            }
            return date;
        }
}

Any suggestions are welcome.

  • 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-06T23:48:49+00:00Added an answer on June 6, 2026 at 11:48 pm

    In general I separate the BL from the DAL, so that the DAL needs a reference to the BL. This means the BL contains POCO’s and an interface that describes the repository/unit-of-work/… So to answer your question, yes, I would still create a DAL which would use L2S.

    To answer you second question, I would create one business object per entity that exist in your domain. Usually this matches with the tables in your DAL. The code-behind of your aspx contains the logic of your page, not the business layer.

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

Sidebar

Related Questions

I am working on an ASP.NET web forms application that is using Forms Authentication.
I have an ASP.NET web application that is using forms authentication. Everything is configured
I have a ASP.NET Web Forms application and I'm using some dynamic controls in
I have an ASP.NET 4 Web Forms app that is using URL Routing. I
I am building a Web Application using asp.net (C#). I come from windows forms
I'm trying to connect to a MySQL database using my ASP.NET Web Forms Application.
I'm working on a heavily data driven ASP.NET web forms application. We're using the
Currently I'm working on Web project that is built using ASP.NET Web Forms. We
In my asp.net web application, I'm using asp.net forms authentication with following configuration. <authentication
My team and I have a asp.net web forms application and are using several

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.