public IActionResult Update(string id, [FromBody] CommuteItem commuteItemIn) { var commuteItem = _commuteService.Get(id); if (commuteItem == null) { return(NotFound()); } _commuteService.Update(id, commuteItemIn); return(NoContent()); }
public ActionResult <CommuteItem> Create([FromBody] CommuteItem commuteItem) { _commuteService.Create(commuteItem); return(CreatedAtRoute("GetCommuteItem", new { id = commuteItem.Id.ToString() }, commuteItem)); }