/// 异常/// /// /// <summary>/// 泛型类 返回模型/// </summary>/// <typeparam name="T"></typeparam>public class ResultListDto<T> : ResultDto, IResultListDto<T>{/// <summary>/// 常规数据/// </summary>public new List<T> Data { get; set; }/// <summary>/// 成功/// </summary>/// <param name="data"></param>/// <param name="msg"></param>/// <returns></returns>public ResultListDto<T> Success(List<T> data = https://www.huyubaike.com/biancheng/default, string msg ="success"){this.Code = (int)EnumCode.Succeed;this.Successful = true;this.Data = https://www.huyubaike.com/biancheng/data;this.Msg = msg;return this;}/// /// 异常/// /// 顺着这个思路,我们可以继续实现分页,多参数返回等等,如果你觉得麻烦,当然也可以直接在nuget直接引用 Sy.ResultExtension,这个组件,苦逼的码农小哥已经为你实现了该功能 。
推荐阅读
-
2024年龙年出生最佳月份 4月出生的属龙人暗藏富贵之命
-
-
-
-
《核酸检测后24小时没出结果怎么办 核酸检测后结果在哪里查询-核酸检测后24小时没出结果怎么办 核酸检测后结果在哪里查询》
-
-
-
-
-
商州区葱郁花卉种植中心_工商信用信息_经营范围期限状态_法人_地址_注册资本_怎么样
-
几款iPhone X手势插件对比 iphonex手势插件哪个好用
-
-
-
云上城之歌阿修罗技能怎么点(云上城阿修罗和气功师哪个厉害)
-
黄山海拔有多高多少米?从山脚爬到黄山顶要几个小时?
-
-
关于潞安集团民爆器材有限公司简述 潞安集团民爆器材有限公司
-
-
-