Advertisement
Guest User

Untitled

a guest
Dec 4th, 2013
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 2.45 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Data.Linq.Mapping;
  6.  
  7. namespace finalProject
  8. {
  9.     [Table(Name="Customers")]
  10.     class entityCustomer
  11.     {
  12.         private int _customerID;
  13.         private string _firstName;
  14.         private string _lastName;
  15.         private string _homeAddress;
  16.         private string _phoneNumb;
  17.         private string _emailAddress;
  18.  
  19.         public entityCustomer()
  20.         {
  21.  
  22.         }
  23.  
  24.         public entityCustomer(string custFirst, string custLast, string custAddress, string custPhone, string custEmail)
  25.         {
  26.             firstName = custFirst;
  27.             lastName = custLast;
  28.             homeAddress = custAddress;
  29.             phoneNumb = custPhone;
  30.             emailAddress = custEmail;
  31.         }
  32.  
  33.         [Column(IsDbGenerated = true, IsPrimaryKey = true, AutoSync = AutoSync.OnInsert, Storage = "_customerID")]
  34.         public int customerID {
  35.             get
  36.             {
  37.                 return _customerID;
  38.             }
  39.             set
  40.             {
  41.                 _customerID = value;
  42.             }
  43.         }
  44.  
  45.         [Column(Storage = "_firstName")]
  46.         public string firstName
  47.         {
  48.             get
  49.             {
  50.                 return _firstName;
  51.             }
  52.             set
  53.             {
  54.                 _firstName = value;
  55.             }
  56.         }
  57.  
  58.         [Column(Storage = "_lastName")]
  59.         public string lastName
  60.         {
  61.             get
  62.             {
  63.                 return _lastName;
  64.             }
  65.             set
  66.             {
  67.                 _lastName = value;
  68.             }
  69.         }
  70.  
  71.         [Column(Storage = "_homeAddress")]
  72.         public string homeAddress
  73.         {
  74.             get
  75.             {
  76.                 return _homeAddress;
  77.             }
  78.             set
  79.             {
  80.                 _homeAddress = value;
  81.             }
  82.         }
  83.  
  84.         [Column(Storage = "_phoneNumb")]
  85.         public string phoneNumb
  86.         {
  87.             get
  88.             {
  89.                 return _phoneNumb;
  90.             }
  91.             set
  92.             {
  93.                 _phoneNumb = value;
  94.             }
  95.         }
  96.  
  97.         [Column(Storage = "_emailAddress")]
  98.         public string emailAddress
  99.         {
  100.             get
  101.             {
  102.                 return _emailAddress;
  103.             }
  104.             set
  105.             {
  106.                 _emailAddress = value;
  107.             }
  108.         }
  109.     }
  110. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement