Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying ASP.NET 3.5 Application Architecture and Design
  • Table Of Contents Toc
ASP.NET 3.5 Application Architecture and Design

ASP.NET 3.5 Application Architecture and Design

By : Vivek Thakur
4.4 (8)
close
close
ASP.NET 3.5 Application Architecture and Design

ASP.NET 3.5 Application Architecture and Design

4.4 (8)
By: Vivek Thakur

Overview of this book

Table of Contents (14 chapters)
close
close
ASP.NET 3.5
Credits
About the Author
About the Reviewers
Preface

1-tier 3-layer Architecture using a Domain Model


Based on the above class diagram, we will create a new simple 3-layered application using the entities defined in the above domain model. We will create a new ASP.NET Web Project in VS. This time, you should create two new folders inside your root web folder (using the Add New Folder option in VS):

  • BL: This folder will contain all of the business logic domain classes

  • DAL: This folder will contain the data access code files (for each entity)

Layer 1: Data Access Layer (DAL)

First, we will create a DAL class for each entity. We will name each DAL class using this naming pattern: EntityDAL. Let us see the CustomerDAL class:

using DomainModel.BL;
namespace DomainModel.DAL
{
public class CustomerDAL
{
public static void AddCustomer(Customer cs)
{
using (SqlConnection con = new SqlConnection(SQLHelper.GetConnectionString()))
{
SqlParameter[] par = new SqlParameter[4];
par[0] = new SqlParameter("@customerID", cs.ID);
par[0].Direction = ParameterDirection...
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
ASP.NET 3.5 Application Architecture and Design
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon