/// <summary> /// 根据条件查找对象 /// </summary> /// <param name="wh">where表达式</param> /// <returns>返回实体或默认值</returns> public T FirstOrDefault(Expression <Func <T, bool> > wh) { return(_ctx.Set <T>().FirstOrDefault(wh)); }