public IActionResult Create([FromBody] Area item) { if (item == null) { return(BadRequest()); } context.Areas.Add(item); context.SaveChanges(); return(CreatedAtRoute("GetArea", new { id = item.Id }, item)); }
public IActionResult Create([FromBody] Region region) { if (region == null) { return(BadRequest()); } context.Regions.Add(region); context.SaveChanges(); return(Ok(region.Id)); }