自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(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

转载 设置session的过期时间

设置session的过期时间12   <sessionState timeout="40">

2015-07-20 17:42:49 1097

转载 在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

淘宝API(同步商品库存)

淘宝API(下载商品资料,同步商品库存)

2013-10-26

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除