I have been searching in CodeProject for an article about MyGeneration Doodads architecture and couldn't find something exactly about this, so I hope this could help anyone.
Doodads is a powerful freely distributed .NET architecture. Using that, anybody can perform .NET. It's easy to use.
The thing which is needed is a good tutorial. Using this tutorial, I want to elaborate the concept and the technique to use Doodads architecture. It supports most of the databases.
Firstly, you need to download MyGeneration tool. And install it in your Machine. With that, you will get the code to create the DLL. Not only that, you can create a DLL with your desired name.
After creating the DLL, paste it in your
Bin folder.
- Generate Stored Procedure using MyGeneration Tools.
- Generate DAL (which consists of the table name with underscore file) using MyGeneration Tools.
- By inheriting the DAL, make BL class like:
public class Employees : _Employees
{
public Employees()
{
}
}
- Create Object of BL class and do your desired thing like:
Employees emps = new Employees();
Employees emps = new Employees();
emps.AddNew();
emps.LastName = "Smith";
emps.HireDate = DateTime.Now;
emps.Save();
emps.MarkAsDeleted();
emps.Save();
emps.LoadByPrimaryKey(PK_ID);
emps.LastName="lastName";
emps.FirstName="FirstName";
emps.Save();
emps.Where.LastName.Value = "%A%";
emps.Where.LastName.Operator = WhereParameter.Operand.Like;
emps.Where.HireDate.Conjuction = WhereParameter.Conj.Or;
emps.Where.HireDate.BetweenBeginValue = "2001-01-01 00:00:00.0";
emps.Where.HireDate.BetweenEndValue = "2001-12-31 23:59:59.9";
emps.Where.HireDate.Operator = WhereParameter.Operand.Between;
emps.Query.Load();
This is very easy to implement.