IRWDataObject - .NET Object Relational Mapper
.NET Object Relational Mapper to Database

irwsoft.com


Home
IRWDataObject's class Design for Student table

It's reflected from table/database design with columns as class's property as needs of business logic

[TableData("Student")]
public class Student
{

[ColumnData("ID", DbType.Int32, false, IsPrimaryKey = true)]
public int ID { get; set; }

[ColumnData("Name", DbType.String, true)]
public string Name { get; set; }

[ColumnData("DOB", DbType.DateTime, true)]
public DateTime DOB { get; set; }

[ColumnData("ClassID", DbType.Int32, true)]
public int ClassID { get; set; }

}


Class for Class table

[TableData("Class")]
public class Class
{

[ColumnData("ID", DbType.Int32, false, IsPrimaryKey = true)]
public int ID { get; set; }

[ColumnData("ClassName", DbType.String, true)]
public string ClassName { get; set; }

}


Note : This table design is for sample only

Copyright by : IrwSoft © 2009 , All Rights Reserved