This project is read-only.

Project Description

Dlib is a lite C# .NET data access helper class library.

This library enables developing the data access layer of a project easily, quickly and efficiently.

Dlib is lite, simple, efficient and 'straightforward', Here are some sample codes. Insert, Update, Delete and Select are simple classes that enables you to do data access.

            using Dlib;       

            //e.g. Insert: -----------------------------------------------------------------------

            Insert objInsert = new Insert("HL_User_Insert");

             objInsert.AddParameter("@Id", SqlDbType.BigInt, 0, ParameterDirection.Output);

            objInsert.AddParameter("@Name", SqlDbType.NVarChar, "Test 3 Name");

            objInsert.AddParameter("@Active", SqlDbType.Bit, true); 

            long lngRtnVal = objInsert.Run();    


           //e.g. Update : -----------------------------------------------------------------------

            Update objUpdate = new Update("HL_User_Update");

            objUpdate.AddParameter("@Id", SqlDbType.BigInt, 3);

            objUpdate.AddParameter("@Name", SqlDbType.NVarChar, "Test 3+1 Name");

            objUpdate.AddParameter("@Active", SqlDbType.Bit, false);



            //e.g. Delete : ----------------------------------------------------------------------- 

            Delete objDelete = new Delete("HL_User_Delete");

            objDelete.AddParameter("@Id", SqlDbType.BigInt, 3); 



            //e.g. Select : ----------------------------------------------------------------------- 

            Select objSelect = new Select("HL_User_GetById");

            objSelect.AddParameter("@Id", SqlDbType.BigInt, 3); 


            string strName = objSelect.Read<string>("Name");

            bool blnActive = objSelect.Read<bool>("Active");



Last edited Sep 2, 2011 at 8:24 AM by eduminda, version 3