public IActionResult Create([FromBody] RealizationItem realizationItem) { _context.Add(realizationItem); _context.SaveChanges(); return(CreatedAtRoute("GetRealizationItem", new { id = realizationItem.Id }, realizationItem)); }
public IActionResult Update([FromBody] RealizationItem realizationItem) { if (realizationItem == null) { return(BadRequest()); } _context.Update(realizationItem); _context.SaveChanges(); return(CreatedAtRoute("GetRealizationItem", new { id = realizationItem.Id }, realizationItem)); }