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; })); }
public void Update(StatusLike statusLike) { _statusLikeRepository.Update(statusLike); }
public StatusLike Add(StatusLike statusLike) { return(_statusLikeRepository.Add(statusLike)); }