摘要:
需要引用using System.Net.Http; var cookies = actionContext.Request.Headers.GetCookies(); // API 推荐 HttpCookieCollection collection = HttpContext.Current.R 阅读全文
摘要:
传递实体对象,首先定义负责对象 public class Student { public string name { get; set; } public string sex { get; set; } public string age { get; set; } public Adress 阅读全文
摘要:
//利用反射实现深拷贝 public static T DeepCopyByReflection<T>(this T tSource) { T tResult = Activator.CreateInstance<T>(); Type sourceType = typeof(T); Type res 阅读全文
摘要:
Controller using System; using System.Collections.Generic; using System.Linq; using System.Net; using System.Net.Http; using System.Web.Http; using Sy 阅读全文
摘要:
约束的作用是 只有大写的参数值才能通过 一、定义约束 二、加载的时候引入约束 三、在controller 引入约束 using System; using System.Collections.Generic; using System.Linq; using System.Net.Http; us 阅读全文