using System; using System.Collections.Generic; using System.Linq; using System.Web; namespace WebAPI.Models { public class Response { /// /// 操作消息【当Status不为 200时,显示详细的错误信息】 /// public string Message { get; set; } /// /// 操作状态码,200为正常 /// public int Code { get; set; } public Response() { Code = 200; Message = "操作成功"; } } /// /// WEBAPI通用返回泛型基类 /// /// public class Response : Response { /// /// 回传的结果 /// public T Result { get; set; } } public class Response2 { /// /// 操作消息【当Status不为 200时,显示详细的错误信息】 /// public string Message { get; set; } /// /// 操作状态码,200为正常 /// public int Code { get; set; } public int Count { get; set; } public List data { get; set; } public Response2() { Code = 200; Message = "操作成功"; Count = 0; } } }