コード例 #1
0
        public HttpResponseMessage Put(HttpRequestMessage request, StatusLike sl)
        {
            return(CreateHttpResponse(request, () =>
            {
                HttpResponseMessage response = null;
                if (ModelState.IsValid)
                {
                    request.CreateErrorResponse(HttpStatusCode.BadRequest, ModelState);
                }
                else
                {
                    _statusLikeService.Update(sl);
                    _statusLikeService.SaveChanges();

                    response = request.CreateResponse(HttpStatusCode.OK);
                }
                return response;
            }));
        }
コード例 #2
0
 public void Update(StatusLike statusLike)
 {
     _statusLikeRepository.Update(statusLike);
 }
コード例 #3
0
 public StatusLike Add(StatusLike statusLike)
 {
     return(_statusLikeRepository.Add(statusLike));
 }