Click here to Skip to main content
15,884,836 members
Articles / Web Development / ASP.NET
Tip/Trick

Working with Doodads Mygeneration Architecture For ASP.NET

Rate me:
Please Sign up or sign in to vote.
4.00/5 (7 votes)
28 Apr 2011CPOL 24.6K   3   6
Doodads Mygeneration Architecture For ASP.NET
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.

  1. Generate Stored Procedure using MyGeneration Tools.

  2. Generate DAL (which consists of the table name with underscore file) using MyGeneration Tools.

  3. By inheriting the DAL, make BL class like:
    C#
    public class Employees : _Employees
    {
      public Employees()
      {
      }
    }
  4. Create Object of BL class and do your desired thing like:
    C#
      Employees emps = new Employees();
      // Insert row 
      Employees emps = new Employees();
      emps.AddNew();
      emps.LastName = "Smith";
      emps.HireDate = DateTime.Now;
      emps.Save();
      // Delete row
      emps.MarkAsDeleted();
      emps.Save();
    
      // For Edit
      
      emps.LoadByPrimaryKey(PK_ID);
      emps.LastName="lastName";
      emps.FirstName="FirstName";
    
      emps.Save();
    
    // For Select Query
    emps.Where.LastName.Value = "%A%";
    emps.Where.LastName.Operator = WhereParameter.Operand.Like;
    //Note: Conjuction not Conjunction
    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.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer India
India India
http://devcorners.com/
Total DotNet/Programming Solution

I am Prasanta Banerjee. I am an Asp.Net Developer. My site: http://devcorners.com/
Email: prasanta.it@hotmail.com
If any body wants to prepare for interview http://guru-code.blogspot.com/ is the good site.

Comments and Discussions

 
GeneralWhat is this ? Pin
Wonde Tadesse29-Apr-11 4:48
professionalWonde Tadesse29-Apr-11 4:48 
GeneralI am really trying hard to think why would anybody sane clas... Pin
mirano28-Apr-11 9:16
mirano28-Apr-11 9:16 
GeneralCould be any ORM Pin
Henry Minute14-Apr-11 9:54
Henry Minute14-Apr-11 9:54 
GeneralRe: Could be any ORM Pin
Prasanta_Prince20-Apr-11 23:50
Prasanta_Prince20-Apr-11 23:50 
GeneralFormatting... Pin
Sandeep Mewara13-Apr-11 5:58
mveSandeep Mewara13-Apr-11 5:58 
GeneralRe: Formatting... Pin
Henry Minute14-Apr-11 9:52
Henry Minute14-Apr-11 9:52 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.