Click here to Skip to main content
15,893,668 members
Articles / Programming Languages / C#

Test Driving NHibernate 3.0, LINQ and the Entity Framework CTP 5 with the Abstract Factory Design Pattern

Rate me:
Please Sign up or sign in to vote.
4.89/5 (18 votes)
2 Apr 2011CPOL12 min read 229.4K   1.7K   53  
Developing an N-Tier application with C#
using System;
using System.Collections.Generic;
using System.Collections;
using System.Linq;
using System.Text;
using System.Data.Entity;

namespace ORMDataModel
{
    /// <summary>
    /// Customer
    /// </summary>
    public class Customer
    {
        public virtual Int32? CustomerID { get; set; }
        public virtual string CustomerCode { get; set; }
        public virtual string CompanyName { get; set; }
        public virtual string ContactName { get; set; }
        public virtual string ContactTitle { get; set; }
        public virtual string AddressLine1 { get; set; }
        public virtual string AddressLine2 { get; set; }
        public virtual string City { get; set; }
        public virtual string Region { get; set; }
        public virtual string PostalCode { get; set; }
        public virtual string Country { get; set; }
        public virtual string Phone { get; set; }
        public virtual string Fax { get; set; }
        public virtual string EmailAddress { get; set; }
        public virtual DateTime DateCreated { get; set; }
        public virtual DateTime? DateUpdated { get; set; }

    }
    /// <summary>
    /// Customer Transaction 
    /// </summary>
    public class CustomerTransaction : TransactionalInformation
    {
       
        public Customer Customer;
        public List<Customer> Customers;
        public long TotalCustomers { get; set; }

        public CustomerTransaction()
        {
            Customer = new Customer();
            ReturnMessage = new List<String>();
            ValidationErrors = new Hashtable();
        }

    }

}

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
Software Developer Joey Software Solutions
United States United States
Mark Caplin has specialized in Information Technology solutions for the past 30 years. Specializing in full life-cycle development projects for both enterprise-wide systems and Internet/Intranet based solutions.

For the past fifteen years, Mark has specialized in the Microsoft .NET framework using C# as his tool of choice. For the past four years Mark has been implementing Single Page Applications using the Angular platform.

When not coding, Mark enjoys playing tennis, listening to U2 music, watching Miami Dolphins football and watching movies in Blu-Ray technology.

In between all this, his wife of over 25 years, feeds him well with some great home cooked meals.

You can contact Mark at mark.caplin@gmail.com

...

Comments and Discussions