Focus on .Net (1)---------------ORM

I agree with that i dislike .net even you think.
It's nothing but the ORM.

All Ojbect relational Mapping includes tables, persistance object, stored procedure and relationship with ojbect.
let us think about the elements as we mentioned.

Stored procedures based on tables and relationships.

Data and abstract classes related to tables and stored procedures.

Some business layer codes is generated by me.
#region EmployeesObject class
 public class EmployeesObject : BusinessObject
 {
  public EmployeesObject()
  {
  }
  private int _employeeid;
  public int employeeid
  {
   get{return  _employeeid;}
   set{  _employeeid = value;}
  }
  private string _lastname;
  public string lastname
  {
   get{return  _lastname;}
   set{  _lastname = value;}
  }
  private string _firstname;
  public string firstname
  {
   get{return  _firstname;}
   set{  _firstname = value;}
  }
  private string _title;
  public string title
  {
   get{return  _title;}
   set{  _title = value;}
  }
  private string _titleofcourtesy;
  public string titleofcourtesy
  {
   get{return  _titleofcourtesy;}
   set{  _titleofcourtesy = value;}
  }
  private DateTime _birthdate;
  public DateTime birthdate
  {
   get{return  _birthdate;}
   set{  _birthdate = value;}
  }
  private DateTime _hiredate;
  public DateTime hiredate
  {
   get{return  _hiredate;}
   set{  _hiredate = value;}
  }
  private string _address;
  public string address
  {
   get{return  _address;}
   set{  _address = value;}
  }
  private string _city;
  public string city
  {
   get{return  _city;}
   set{  _city = value;}
  }
  private string _region;
  public string region
  {
   get{return  _region;}
   set{  _region = value;}
  }
  private string _postalcode;
  public string postalcode
  {
   get{return  _postalcode;}
   set{  _postalcode = value;}
  }
  private string _country;
  public string country
  {
   get{return  _country;}
   set{  _country = value;}
  }
  private string _homephone;
  public string homephone
  {
   get{return  _homephone;}
   set{  _homephone = value;}
  }
  private string _extension;
  public string extension
  {
   get{return  _extension;}
   set{  _extension = value;}
  }
  private byte[] _photo;
  public byte[] photo
  {
   get{return  _photo;}
   set{  _photo = value;}
  }
  private string _notes;
  public string notes
  {
   get{return  _notes;}
   set{  _notes = value;}
  }
  private int _reportsto;
  public int reportsto
  {
   get{return  _reportsto;}
   set{  _reportsto = value;}
  }
  private string _photopath;
  public string photopath
  {
   get{return  _photopath;}
   set{  _photopath = value;}
  }
public int Load(int employeeidParam)
  {
    Data.Employees oEmployees = new Data.Employees(ConnectionString);
.................

posted on 2004-09-03 10:32  LeighSword  阅读(209)  评论(0编辑  收藏  举报

导航