public void Update(AnecdoteUpdateViewModel model) { repository.Update(new Anecdote { Id = model.Id, Title = model.Title, Content = model.Content, Owner = model.Owner, Status = model.Status }); Save(); }
public HttpResponseMessage Update([FromBody] AnecdoteUpdateViewModel model) { service.Update(model); return(new HttpResponseMessage(HttpStatusCode.OK)); }