/// <summary> /// 获得一个成功返回对象 /// </summary> /// <param name="data">返回数据对象</param> /// <param name="pagingM">分页信息</param> /// <param name="message">返回消息</param> /// <returns>成功返回对象</returns> public static PagedResult <T> Success(T data, MPageModel pagingM, string message = "") { return(new PagedResult <T>(MResultType.Success, data, pagingM, message)); }
/// <summary> /// 获得一个失败返回对象 /// </summary> /// <param name="data">返回数据对象</param> /// <param name="pagingM">分页信息</param> /// <param name="message">返回消息</param> /// <returns>失败返回对象</returns> public static PagedResult <T> Fail(T data = default(T), MPageModel pagingM = null, string message = "") { return(new PagedResult <T>(MResultType.Fail, data, pagingM, message)); }
/// <summary> /// 构造方法 /// </summary> /// <param name="resultType">返回对象类型</param> /// <param name="data">返回数据对象</param> /// <param name="pagingM">分页信息</param> /// <param name="message">返回消息</param> public PagedResult(MResultType resultType, T data, MPageModel pagingM, string message = "") : base(resultType, data, message) { PageInfo = pagingM; }