Data Persistent Object (DPO)
FREE ORM tool to access SQL Server/Excel/MySQL/Oracle/MS Access, log record changes , record locking,  Json and Linq supported

Features:
 - Create Dpo class from existing table, and has ability to pack records in to Dpo-Package class to release data.
- Create Table from Dpo class and insert/update record from Dpo-Package class
- Log transaction to log records changes from different tables when dpo Save/Insert/Update
- Synchronize .NET enum Type with records in table
- Detect table structure (column name, type,...) changes by using const column name variable, and detect size of column.
- Generate SQL statements by SqlClause class
- Support multiple users, and record locking

 

To see DPO Example, go to tab [SOURCE CODE] above, find folder: MgCode\DpoClass\*.cs
Example: SqlClause:
SqlClause sql = new SqlClause()
               .SELECT.COLUMNS()                  
               .FROM<UserDpo>()                  
               .WHERE(                         
                  (UserDpo._Email.ColumnName()!= "")         
              .AND(UserDpo._First_Name.ColumnName() =="Unknown")     
               .OR(UserDpo._Last_Name.ColumnName()=="devel")
               );   
//sql.ToString()--> SELECT *  FROM medsys..[sys00101] WHERE (([Email] <> '') AND ([First_Name] = 'Unknown')) OR ([Last_Name] = 'devel')

Example: Dpo Linq
IEnumerable<UserMenuDpo> list =  
    new TableReader<UserMenuDpo>(UserMenuItem._ParentID.ColumnName() == 10)     
        .ToList()            
        .Where(dpo => dpo.Released)    
        .OrderBy(dpo => dpo.OrderBy);

Last edited Jan 19, 2013 at 5:57 PM by fjiang2, version 10