/// <summary> /// 返回首列结果 /// </summary> /// <typeparam name="TResult"></typeparam> /// <returns></returns> public TResult ToScalar <TResult>() { var db = new DBExtend(__DbContext); var result = db.QueryScalar(this); if (result == null) { return(default(TResult)); } return((TResult)result); }
/// <summary> /// 返回首列结果 /// </summary> /// <returns></returns> public dynamic ToScalar() { var db = new DBExtend(__DbContext); return(db.QueryScalar(this)); }