using System; using System.Collections.Generic; using System.Linq; using System.Runtime.Serialization; using System.Web; namespace WEB.Server.Models { /// <summary> /// 集合数据 /// </summary> /// <typeparam name="T">类型</typeparam> [DataContract] public class ListData<T> { /// <summary> /// 数据总数 /// </summary> [DataMember] public int TotalCount { get; set; } /// <summary> /// 数据 /// </summary> [DataMember] public List<T> Data { get; set; } /// <summary> /// 创建集合数据 /// </summary> /// <param name="totalCount">数据总数</param> /// <param name="data">数据</param> public ListData(int totalCount, List<T> data) { this.TotalCount = totalCount; this.Data = data; } } }
时间: 2024-10-10 15:54:51