public HttpResponseMessage UpdateList(int id, TodoListViewModel newList) { try { var list = _listService.GetById(id); list.Name = newList.Name; _listService.Update(list); return(Request.CreateResponse(HttpStatusCode.OK, newList)); } catch (Exception) { return(Request.CreateResponse(HttpStatusCode.InternalServerError)); } }