摘要: config.EnableCors(new EnableCorsAttribute("*","*","*")); <httpProtocol> <customHeaders> <add name="Access-Control-Allow-Origin" value="*" /> <add name 阅读全文
posted @ 2016-09-08 16:27 蜡笔小新0998 阅读(181) 评论(0) 推荐(0)
摘要: return (from row in data.AsEnumerable() select new GoodsInfoViewModel() { GId = row.Field<int>("Gid"), GName = row.Field<string>("GName") }).FirstOrDe 阅读全文
posted @ 2016-04-18 09:58 蜡笔小新0998 阅读(1312) 评论(0) 推荐(0)
摘要: 1-1 首先定义一个类并且继承筛选器的基类 1-2 并且重写 在调用MVC框架至前调用的方法 public class LoginJudgeAttribute:ActionFilterAttribute==>筛选器的基类 { public override void OnActionExecutin 阅读全文
posted @ 2016-04-18 09:52 蜡笔小新0998 阅读(487) 评论(0) 推荐(0)
摘要: 恢复内容开始 一.已创建session类型的扩展方法为实例 首先创建一个类==>MyExtention==>添加返回方法 this为扩展方法的关键字 1-1public static class MyExtention { /// <summary> /// 返回指定session类型 /// </ 阅读全文
posted @ 2016-04-18 09:43 蜡笔小新0998 阅读(152) 评论(0) 推荐(0)
摘要: select NAME from Test group by NAME having avg(FENSHU)>10 阅读全文
posted @ 2016-04-08 10:14 蜡笔小新0998 阅读(156) 评论(0) 推荐(0)
摘要: 1.先添加实体类 public class Student { public int Id { get; set; } public string Name { get; set; } public DateTime Time { get; set; } public virtual ClassIn 阅读全文
posted @ 2016-04-05 13:37 蜡笔小新0998 阅读(279) 评论(0) 推荐(0)
摘要: api的设置 1.设置api接口返回json数据 App_Start-->WebApiConfig-->添加 config.Formatters.Clear();config.Formatters.Add(new JsonMediaTypeFormatter()); 两行代码 2.设置api跨域支持 阅读全文
posted @ 2016-04-05 09:53 蜡笔小新0998 阅读(369) 评论(0) 推荐(0)