public IActionResult DeleteById(string id) { var ZoneId = Guid.Parse((string)id); if (ZoneId == null) { return(BadRequest()); } var Zone = _ZoneService.GetZone(ZoneId); if (Zone == null) { return(NotFound()); } _ZoneService.DeleteZone(ZoneId); return(Ok()); }
public async Task <ActionResult <bool> > DeleteZone( [FromServices] IZoneService zoneService, [FromRoute] int zoneId) { return(await zoneService.DeleteZone(zoneId)); }