上一页 1 2 3 4 5 6 7 8 9 ··· 30 下一页
摘要: 我们还是以订单表为例 1:系统推荐的方法,先查询出来,然后调用remove方法进行删除 我们删除id大于等于4的 static void Main(string[] args) { Delete(o => o.Id >= 4); //这里的参数是个 lambda 表达式 } public static void... 阅读全文
posted @ 2014-07-08 09:54 梨花驿路 阅读(541) 评论(0) 推荐(0) 编辑
摘要: 因为 Internet Explorer 和 Firefox 发送了不同的 Accept 头,所以 web API 在响应里就发送了不同的内容类型。 解决方法,在 Global.asax的 Application_Start() 加入下面的代码 GlobalConfiguration.Configuration.Formatters.XmlFormatter.SupportedMedia... 阅读全文
posted @ 2014-07-07 17:04 梨花驿路 阅读(651) 评论(0) 推荐(0) 编辑
摘要: 1:修改成中文简体 2: 注册破解 (记得一定要先断网) admin admin@admin.com 31GKI-OK1HY-59H35-Y8GPB-8WDY6 3 : 创建连接 搞定 阅读全文
posted @ 2014-07-07 14:46 梨花驿路 阅读(532) 评论(0) 推荐(0) 编辑
摘要: try{ ...}catch (Exception e) { //在webapi中要想抛出异常必须这样抛出,否则之抛出一个默认500的异常 var resp = new HttpResponseMessage(HttpStatusCode.InternalServerError) { Content = new StringContent(e.ToStr... 阅读全文
posted @ 2014-07-06 17:56 梨花驿路 阅读(994) 评论(0) 推荐(0) 编辑
摘要: 占位 阅读全文
posted @ 2014-07-03 17:17 梨花驿路 阅读(118) 评论(0) 推荐(0) 编辑
摘要: 分布式的基础:一致性哈希 路由算法的一致性hash http://www.jiacheo.org/blog/174 http://www.tuicool.com/articles/vQVbmai http://www.cnblogs.com/huangxincheng/p/3708316.html redis 和 mongodb的使用,要能自己写 helper帮助类,和多台机... 阅读全文
posted @ 2014-07-02 15:01 梨花驿路 阅读(2154) 评论(0) 推荐(1) 编辑
摘要: 方法1: 使用js的扩展方法 ** * json对象转字符串形式 */ function json2str(o) { var arr = []; var fmt = function(s) { if (typeof s == 'object' && s != null) return json2str(s); return /^(string|number)$/.test(typeof s... 阅读全文
posted @ 2014-06-27 15:11 梨花驿路 阅读(950) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2014-06-26 19:36 梨花驿路 阅读(4) 评论(0) 推荐(0) 编辑
摘要: 目录一:简单介绍什么是Web api二:怎么定义的 Post Get Put 和 Delete三:简单使用,直接从前台传递一个类到后台接收四:其他获取值的方式一:简单介绍什么是Web apiREST属于一种设计风格,REST 中的 POST(新增数据),GET(取得数据),PUT(更新数据),DEL... 阅读全文
posted @ 2014-06-26 18:10 梨花驿路 阅读(1241) 评论(1) 推荐(3) 编辑
上一页 1 2 3 4 5 6 7 8 9 ··· 30 下一页