예제 #1
0
파일: DALBase.cs 프로젝트: yiuweiping/orm
 public T Get(dynamic pkValue)
 {
     var where = new WhereGrouping(WhereSpliceType.And);
     where.WhereItems.Add(new Where(this.DbService.Mapper.PrimaryKey.Name, pkValue, CompareType.等于));
     return(this.DbService.SelectSingle(where, null, null));
 }
예제 #2
0
파일: DALBase.cs 프로젝트: yiuweiping/orm
 public T Get <TForeign>(dynamic pkValue, JoinType join) where TForeign : DataEntity, new()
 {
     var where = new WhereGrouping(WhereSpliceType.And);
     where.WhereItems.Add(new Where(this.DbService.Mapper.PrimaryKey.Name, pkValue, CompareType.等于));
     return(this.DbService.SelectSingle <TForeign>(where, join, null));
 }
예제 #3
0
파일: DALBase.cs 프로젝트: yiuweiping/orm
 public dynamic Delete(dynamic pkValue)
 {
     var where = new WhereGrouping(WhereSpliceType.And);
     where.WhereItems.Add(new Where(this.DbService.Mapper.PrimaryKey.Name, pkValue, CompareType.等于));
     return(this.DbService.Delete(where));
 }