Project Description
LightORM provide a easier way to use ORM. You'll no longer have to write xml config or add attributes.Data read from the SqlDataReader will tranlate to object at once by reflection.
There is only one thing you care: the class property name and Table column name are the same!


How To Use?

          
  string connectstring = System.Configuration.ConfigurationManager.ConnectionStrings["DemoConnectionString"].ConnectionString;  
 DefaultDataFacade target = new DefaultDataFacade(connectstring);  
            //Single
            var t = target.Single<Student>("select top 1 * From Student");

            // IEnumerable<T>
            var s= target.Select<Student>("select top 10 * From Student");
           
            //Stored Procedure
            string spname = "SPTest";
            SqlParameter[] parameters = ParameterCache.ResolveSpParameters(connectstring, spname);

                //add parameter value here ....

            var p = target.ExecuteStoredProdedureWithResultSet(spname, parameters);
           

       
Notice Here:There is only one thing you care, the class property name and Table column name are the same(case sensitive )!


Code is the best documentation: http://lightorm.codeplex.com/documentation

Most important part the project used is available here:
Dynamic... But Fast: The Tale of Three Monkeys, A Wolf and the DynamicMethod and ILGenerator Classes.
Microsoft Data Access Application Block for .NET.

Last edited Oct 28, 2010 at 10:02 AM by ligaoren, version 7