Exemplo 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
            });
        }
Exemplo 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));
 }
Exemplo n.º 3
0
 public TEntity GetModel(Expression <Func <TEntity, bool> > where)
 {
     return(_dbSet.GetSingle(where));
 }
Exemplo n.º 4
0
 public Club Get(int Id)
 {
     return(rdb.GetSingle(p => p.Id == Id));
 }
Exemplo n.º 5
0
        public T Get(Expression <Func <T, bool> > whereExpression)
        {
            var test = new SimpleClient <T>(Db);

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