Resource Page DescriptionXGENO.ORM is a simple and easy to use high performant ORM tool for use with .NET 3.5 based projects (Win Forms, ASP.NET, WPF, Silverlight 2.0) against Microsoft SQL Server 2005/2008.
The purpose is to eliminate the effort and time required to maintain back-end objects and concentrate on the front-end in a very intuitive way with this component taking care of all the back-end tasks. The front-end objects can be bound to forms, grids etc. in windows applications (traditional and WPF), ASP.NET and Silverlight without effort.
Please see below a simple overview of XGENO.ORM. For full features and capabilities, check the Documentation in the Releases folder.
For more information, you can contact me at:
naweed@xgeno.com Overview Consider a simple table structure as below:
Table Name: tb_Users
Fields:
cod_UserName nvarchar(50) PRIMARY KEY
txt_FullName nvarchar(200)
txt_EmailAddress nvarchar(50)
dat_DateOfBirth datetime
num_Dependents int
Wouldn’t it be just convenient, if you could do this:
1) Declare a class for the above structure as below:
public class User
{
public string UserName { get; set; }
public string FullName { get; set; }
public string EmailAddress { get; set; }
public DateTime DOB { get; set; }
public int Dependents { get; set; }
}
2) Make one time setup for database as follows:
DBConfig.SetDB(“server=XGENO-DEV;database=Accounting_DB;Integrated Security=SSPI;”);
3) Do the following:
User _user = new User();
_user. UserName = “naweed”;
_user. FullName = “Naweed Akram”;
_user.EmailAddress = “naweed@xgeno.com”;
_user.dOB = new DateTime(1976, 9, 6);
_user.Dependents = 2;
_user.Save(); //To save the newly created user
Or
User _user = User.GetByID(“nakram”);
_user.FullName = “Naweed Akram Mughal”;
_user.Save(); //To update an existing user
_user.Delete(); //To delete the existing user
Or
List<User> _userList = User.FindAll(); //Find all the users in the system
//Find all the users in the system who have three dependents
List<User> _userList = User.Find (“Dependents”, “=”, “3”);
//Find all the users in the system who have names starting with N
List<User> _userList = User.Find (“FullName”, “like”, “N%”);
//Find all the users in the system who have names starting with N, get top 5 records and sort by FullName
List<User> _userList = User.Find (“FullName”, “like”, “N%”, 3, “FullName”);
//Find all the users in the system who have names starting with N and Dependents are less than 3
List<User> _userList = User.Find (AndCondition(“FullName”, “like”, “N%”, “Dependents”, “<”, “3”));