public void UpdateItem(Article item) { genericUnitOfWork.Repository<Article>().Update(item); genericUnitOfWork.Save(); }
public HttpResponseMessage PostItem(Article item) { var errors = ModelState.Values.SelectMany(v => v.Errors); if (ModelState.IsValid) { _Item.PostItem(item); HttpResponseMessage response = Request.CreateResponse(HttpStatusCode.Created, item); return response; } else { return Request.CreateErrorResponse(HttpStatusCode.BadRequest, ModelState); } }
public void UpdateItem(Article item) { _unitOfWork.Repository<Article>().Update(item); _unitOfWork.Save(); }