Click here to Skip to main content
15,885,767 members
Articles / Programming Languages / XML

Dependency Injection using Spring.NET

Rate me:
Please Sign up or sign in to vote.
4.39/5 (23 votes)
28 May 2008CPOL5 min read 167K   4.2K   64  
Dependency Injection and how it is supported in Spring.NET.
using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using DAL.Interface;

namespace BLL.Customer
{
    public class CustomerBLL : BaseBLL
    {
        private IDAL _customerDAL = null;

        public CustomerBLL()
            : base()
        {
            _customerDAL = (IDAL)_applicationContext["CustomerDAL"];
        }

        #region IBLL Members

        public override DataTable GetAll()
        {
            return _customerDAL.GetAll();
        }

        public override DataTable GetById(string ID)
        {
            return _customerDAL.GetById(ID);
        }

        public override bool SaveOrUpdate(DataTable entity)
        {
            return _customerDAL.SaveOrUpdate(entity);
        }

        #endregion
    }
}

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, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Architect Cognizant Technology Solutions
United States United States
Solution Architect working for Cognizant Technology Solutions.

Comments and Discussions