//存储过程SubSonic.Schema.StoredProceduresp=newSubSonic.Schema.StoredProcedure("fenye");sp.Command.AddParameter("@Id","1");sp.Command.AddOutputParameter("@Id");sp.Command.AddReturnParameter();sp.Execute();varov=sp.Command.OutputValues;//sql语句var sql = new CodingHo Read More
增DAL.UseruModel=newDAL.User();uModel.UserName=string.Format("{0}{1}",u.UserName,i);uModel.Expire=DateTime.Now;uModel.Password=string.Empty;uModel.Save();newInsert().Value(DAL.UsersTable.UserNameColumn,"admin").Execute();改DAL.UseruModel=newDAL.User(uuu=>uuu.Id == 1);uModel.User Read More
SqlQueryquery=newSelect(DAL.UsersTable.IdColumn,"UserName") .From<DAL.User>().LeftInnerJoin<DAL.User>(DAL.UsersTable.IdColumn,DAL.UsersTable.IdColumn) .Where(DAL.UsersTable.IdColumn).IsGreaterThan(0);//添加条件query.And("UserName").IsEqualTo("admin");//分页query.P Read More
在官网中的方法是错的官网的using(SharedDbConnectionScopesharedConnectionScope=newSharedDbConnectionScope()){using(TransactionScopets=newTransactionScope()){Productp=newProduct.SingleOrDefault(x=>x.ProductID==1);p.Title="newtitle";Productp2=newProduct.SingleOrDefault(x=>x.ProductID==2);p.Title=&quo Read More