Esempio n. 1
0
        public BizResult <T> GetSingle(Expression <Func <T, bool> > whereExpression)
        {
            var res = sdb.GetSingle <T>(whereExpression);

            if (res == null)
            {
                return(null);
            }

            return(new BizResult <T>
            {
                Data = res,
                Msg = "成功",
                Success = true
            });
        }
Esempio n. 2
0
 /// <summary>
 /// Query Single data by condition
 /// </summary>
 /// <param name="whereExpression"></param>
 /// <returns></returns>
 public T GetSingle(Expression <Func <T, bool> > whereExpression)
 {
     return(currentDb.GetSingle(whereExpression));
 }
Esempio n. 3
0
 public TEntity GetModel(Expression <Func <TEntity, bool> > where)
 {
     return(_dbSet.GetSingle(where));
 }
Esempio n. 4
0
 public Club Get(int Id)
 {
     return(rdb.GetSingle(p => p.Id == Id));
 }
Esempio n. 5
0
        public T Get(Expression <Func <T, bool> > whereExpression)
        {
            var test = new SimpleClient <T>(Db);

            return(test.GetSingle(whereExpression));
        }
Esempio n. 6
0
 public RefereeApply Get(int id)
 {
     return(rdb.GetSingle(p => p.ApplyUserId == id));
 }