Click here to Skip to main content
15,891,136 members
Articles / Programming Languages / C#

Implementing A Data Model and Business Layer that Supports State Management

Rate me:
Please Sign up or sign in to vote.
4.58/5 (7 votes)
29 Aug 2007CPOL10 min read 51.9K   530   49  
This article describes a technique to develop business layer logical entities that have in-built state management capabilities. It focuses on how to re-use components to make development of new business logic and data modelling layers easier.
/***************************************************
 * Citrus.Core
 * (C) Benzi K. Ahamed 2007 
 * 
 * Core Citrus components
 * Part of the Citrus framework 
 ***************************************************/

using System;
using System.Collections.Generic;
using System.Text;

namespace Citrus.Core
{
    public class ValueUpdateEventArgs<Item> : EventArgs
    {
        Item _oldItem;

        public Item OldItem
        {
            get { return _oldItem; }
            set { _oldItem = value; }
        }

        Item _newItem;

        public Item NewItem
        {
            get { return _newItem; }
            set { _newItem = value; }
        }

        public ValueUpdateEventArgs(Item oldItem, Item newItem)
        {
            this._oldItem = oldItem;
            this._newItem = newItem;
        }
    }
}

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
Web Developer
United Kingdom United Kingdom
I work as a Technology Lead for an IT services company based in India.

Passions include programming methodologies, compiler theory, cartooning and calligraphy.

Comments and Discussions