Search Wiki:
Resource Page Description
XGENO.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”));

Last edited Jan 20 2009 at 6:43 AM  by naweed, version 6
Comments
mhensen wrote  Jan 22 2009 at 9:38 AM  
Hmm .. seems to be a very easy to use environment.
Curious about the performance and the source code :-)
Perhaps a layer to get more schema info of the database to be able to be more dynamic!

naweed wrote  Jan 22 2009 at 4:10 PM  
hensen:
As per my testing, the performance seems to be very good (apart from first time operation which takes time coz connection has to be opened). This is the same performance that you would expect issueing statements to database from .net code. As the no. of records grow, the performance might go down, but this can be fixed by properly indexing the columns on which you apply your filters. And also, this is meant for small to medium size projects. For larger projects, I myself wouldn't use this. I would rather go the way of custom written stored procs.

As for the source code, I plan to release it in future after giving it some thought.

Can you plz elaborate more on the last part as to what more can be helpful from the schema.

naweed wrote  Jan 22 2009 at 4:11 PM  
Also note, that I plan to add the functionality for validation in the next version.

Something like mark the field as Required, or RangeValidation or RegexValidation, and before saving, it will check if the field value satisfies the validation condition. Coming soon.

jas wrote  Feb 12 2009 at 3:37 PM  
Interesting project, easy and powerful. Is there some way to run stored procedures?
When is planned the 2.0 version?
Thanks,

ShinyZhu wrote  Feb 15 2009 at 2:35 AM  
Hi, naweed, this is a great project and easy to use, you can consider the LINQ expression in the filter. :)

naweed wrote  Feb 17 2009 at 6:34 AM  
jas: Yes, there is a way to run the stored procs. This will be available in release 1.1 which will be released by end of this week.

naweed wrote  Feb 17 2009 at 4:12 PM  
Version 1.1 released.
Added:
1) Running stored procs against database.
2) Object based validation (RequiredField, RangeValidator, DefaultValue)

naweed wrote  Aug 5 2010 at 8:55 AM  
Release version 2.0 which is .NET 4.0 based.
Working on v3.0 now. Let me know new features that you would like to see in this version.

Updating...
Page view tracker