Moon.ORM 4.0 发布

复杂事务支持

View Code
            var t1=DateTime.Now.Ticks;
            var tran=DBFactory.DefaultDB.GetOpenDbConnection().BeginTransaction();
            
            var newUser=DBFactory.GetEntity<Administrator>(AdministratorTable.ID.BiggerThan(0),tran);
            Console.WriteLine(newUser.Password);
            
            Administrator ad=new Administrator();;
            ad.Password=DateTime.Now.ToString();
            ad.UserName=DateTime.Now.ToString();
            var id=DBFactory.Add(ad,tran);
            Console.WriteLine(id);
            
            DBFactory.DeleteWhen(AdministratorTable.ID.BiggerThan(2),tran);
            string sql="insert into Administrator([ID],[Password],[UserName]) values('qsmy','33','332')";
            DBFactory.DefaultDB.ExecuteOneSql(sql,tran);
            Console.WriteLine(tran.Connection.State);
            tran.Commit();

 

性能提升

性能对比

 

 

 

个别API添加(空字段检测功能,记录条数查询返回Int32)

日志功能

配置日志功能,可以跟踪每一条sql语句

 <add key="START_LOG" value="C:\2.TXT"/>

 企业开发工具预览(开发中,到时预赠送一批给提出宝贵意见和由评论者中随机抽奖中产生的博友)

 

 

 下载:/Files/humble/ORM4-0.zip

posted @ 2012-06-22 10:25  [秦时明月]  阅读(609)  评论(5编辑  收藏  举报