public IActionResult Create([FromBody] RealizationItem realizationItem) { _context.Add(realizationItem); _context.SaveChanges(); return(CreatedAtRoute("GetRealizationItem", new { id = realizationItem.Id }, realizationItem)); }
public IActionResult Create() { Objective objective = new Objective(); objective.Category = new Category { Id = -1 }; _context.Add(objective); _context.SaveChanges(); return(CreatedAtRoute("GetObjective", new { id = objective.Id }, objective)); }