Example #1
0
 private static void Update()
 {
     var service = new BaseDataService();
     var list = service.Fetch(new Sql<BaseDataDataModel>().Where(t => t.RowStatus == 0));
     service.Update(list[0]);
     service.Update(list[0], t => t.RowStatus);
     //service.Update(new Expression<Func<BaseDataDataModel, object>>[]{t => t.Name, t => t.GroupCode}, list, t => t.RowStatus, t => t.Code);
 }
Example #2
0
 private static void Page()
 {
     var service = new BaseDataService();
     var list = service.Fetch(new Sql<BaseDataDataModel>("T").Select(t=>t.Name).From().Where(t => t.RowStatus == 0 && t.Id > 10).OrderBy(t=>t.CreatedOn,t=>t.RowStatus).OrderByDescending(t=>t.Name));
     var page = service.Page(2, 15, new Sql<BaseDataDataModel>().Where(t => t.RowStatus == 0 && t.Id > 10));
 }