Click here to Skip to main content
15,886,542 members
Articles / Web Development / ASP.NET

Enterprise Application Architecture with LINQ to SQL

Rate me:
Please Sign up or sign in to vote.
4.73/5 (44 votes)
17 Oct 200722 min read 294.1K   4.1K   277  
A discussion about architectural patterns for using LINQ to SQL in enterprise applications, along with performance implications
using System;
using System.Linq;
using System.Collections.Generic;
using System.Text;

using Northwind.Business.DataInterfaces;
/*
 **************************************************************
 * Author: Rohit Gadagkar (rohit.gadagkar@gmail.com)
 * Copyright © 2007 Rohit Gadagkar
 * License:
 * Free without any restrictions whatsoever 
 *
 * Created: 9/1/2007
 * 
 * THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY
 * OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT
 * LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
 * FITNESS FOR A PARTICULAR PURPOSE.
 **************************************************************  
*/

namespace Northwind.Business
{
    /*
     * The Northwind usecase that I am presenting in this solution is trivial.
     * There is no common DAO functionality that calls for a generic IDAO interface.
     * Hence the BaseBO takes an IDaofactory as dependency. In more complex use cases
     * the BaseBO may take an IDao dependency and the Service Layer could take an
     * IDaoFactory dependency and hand over an IDao dependency to the Business Layer.
     * This pattern assumes that workflow or inter business object calls are handled
     * by the service layer (Session Facade pattern).
     */
    public abstract class BaseBO
    {
        protected IDaoFactory daoFactory;

        public BaseBO(IDaoFactory factory) { daoFactory = factory; }
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Web Developer
United States United States
I am a tech lead working for Cap Gemini. Although I primarily work with the Microsoft technology stack (including .NET and legacy technologies) I like to keep myself informed about developments in the Java world.

Comments and Discussions