摘要:
Creating a REST service using ASP.NET Web APIByAfter2050,13 Sep 20124.33(3 votes)IntroductionA service that is created based upon the architecture ofRESTis called as REST service. Although REST looks more inclined to web and HTTP its principles can be applied to other distributed communication syste 阅读全文
posted @ 2012-12-15 13:03
火腿骑士
阅读(386)
评论(0)
推荐(0)
摘要:
public Task Get(int id){ var task = _taskRepository.Get(id); if (task == null) { throw new HttpResponseException(new HttpResponseMessage { StatusCode = HttpStatusCode.NotFound, Content = new StringContent("Task not found") }); } return task;}public Task Put(Task task){ try { task = _taskRe 阅读全文
posted @ 2012-12-15 12:55
火腿骑士
阅读(231)
评论(0)
推荐(0)
浙公网安备 33010602011771号