- 博客(13)
- 资源 (1)
- 收藏
- 关注
转载 System.Nullable<System.DateTime>”不包含“Year”的定义
e.f_ShippingDate.Year==2012 =>e.f_ShippingDate.Value.Year==2012
2015-07-24 14:31:59 1898
原创 EF中Expression<Func<T,bool>>动态查询怎么写啊
定义一个查全局的..Expression> exp= a=>1==1if(aa!=""){ exp = a=>a.s==1}if(bb!=""){ exp = a=>a.b==1} var items = HotelSearchInfoList.ToList().Where(Exp.Compile()).Select(s => new
2015-07-24 14:23:18 13028 1
转载 拉姆达表达式 追加 条件判断 Expression<Func<T, bool>>
拉姆达表达式 追加 条件判断 Expression> 2014/11/13 14:47:59 虫虫飞520 程序员俱乐部 我要评论(0)摘要:publicstaticclassPredicateBuilder{//////机关函数应用True时:单个AND有效,多个AND有效;单个OR无效,多个OR无效;混应时写在AND后的OR有效/////////publicsta
2015-07-24 11:52:19 8565
转载 C# json提取多层嵌套到数组
string jsonText = "{'name':'test','phone':'18888888888','image':[{'name':'img1','data':'data1'},{'name':'img2','data':'data2'},{'name':'img3','data':'data3'}]}"; 2 JObject jo = (JObject)JsonConvert
2015-07-23 14:15:52 2058
转载 .net 4.5反序列化DataContractSerializer
DataContractSerializer Class.NET Framework 4.6 and 4.5Other VersionsSerializes and deserializes an instance of a type into an XML stream or document using a
2015-07-22 18:14:07 1153
转载 web api写api接口时默认返回的是把你的对象序列化后以XML形式返回,那么怎样才能让其返回为json呢
web api写api接口时默认返回的是把你的对象序列化后以XML形式返回,那么怎样才能让其返回为json呢,下面为大家介绍几种不错的方法web api写api接口时默认返回的是把你的对象序列化后以XML形式返回,那么怎样才能让其返回为json呢,下面就介绍两种方法: 方法一:(改配置法) 找到Global.asax文件,在Application_Start
2015-07-21 10:58:11 5754
转载 在MVC的WebApi中默认是没有开启Session会话支持的。需要在Global中重写Init方法来指定会话需要支持的类型
在MVC的WebApi中默认是没有开启Session会话支持的。需要在Global中重写Init方法来指定会话需要支持的类型public override void Init() { PostAuthenticateRequest += MvcApplication_PostAuthenticateRequest; bas
2015-07-20 17:04:08 1158
转载 读取WEB API验证参数
//request at http://localhost/api/foo/id?MyValue=1public class MyAuthorizationAttribute : AuthorizeAttribute{ protected override bool IsAuthorized(HttpActionContext actionContext) {
2015-07-20 15:56:31 2007
原创 WebApi有多个POSt方法。
config.Routes.MapHttpRoute( name: "DefaultApi", routeTemplate: "api/{controller}/{action}/{id}", defaults: new { id = RouteParameter.Optional }
2015-07-18 17:37:35 5647
原创 No assembly found containing an OwinStartupAttribute.
No assembly found containing an OwinStartupAttribute.No assembly found containing a Startup or [AssemblyName].Startup class. To disable OWIN startup discovery, add the appSetting owin:AutomaticAppSt
2015-07-16 15:06:39 5391 3
原创 安装安卓的开发环境
1、jdk config: http://jingyan.baidu.com/album/f96699bb8b38e0894e3c1bef.html?picindex=12、android-sdk_r24.1.2-windows 运行SDK Manager 选择下载的安装的版本号:TOOLS全选、最新版本SDK Platform、ARM EABI V7a System Image. Sour
2015-07-15 06:15:19 518
转载 C# web api返回类型设置为json的两种方法
web api写api接口时默认返回的是把你的对象序列化后以XML形式返回,那么怎样才能让其返回为json呢,下面就介绍两种方法: 方法一:(改配置法) 找到Global.asax文件,在Application_Start()方法中添加一句: 。代码如下:GlobalConfiguration.Configuration.Formatters.XmlFormatte
2015-07-07 17:38:05 810
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人