摘要: 【前言】 本节用于承上启下,通过第一节了解的WebAPI的基本语法,Controller CRUD方法的基本格式; 但很多场合,第一节中的Web API Controller方法返回的信息 过于简单,对错误的处理能力很差,不利于创建功能完备的项目。 所以在第三节中,将介绍比较标准的CRUD方法格式。 这一节,就用来介绍第三节中需要用到的那些理论。【HttpRequestMessage】 HttpRequestMessage 【HttpResopnseMessage】 阅读全文
posted @ 2013-08-29 14:41 chutianshu_1981 阅读(743) 评论(0) 推荐(0) 编辑
摘要: 【源】 来自微软WebAPI官方视频,Introduction to the ASP.NET Web API --Uniform Interface -- Demo-Using convention 这一节。 http://pluralsight.com/training/Player?author=jon-flanders&name=aspnetwebapi-m1-introduction&mode=live&clip=0&course=aspnetwebapi 先上一张WebAPI中所有用户Controller都必须继承的ApiController基类代码: 阅读全文
posted @ 2013-08-29 11:43 chutianshu_1981 阅读(1125) 评论(0) 推荐(0) 编辑