public async Task <ActionResult> Delete(int id) { try { Zone zone = await repository.FindZoneAsync(id); if (zone == null) { return(NotFound()); } await repository.DeleteZoneAsync(zone); return(Ok("Deleted")); } catch (Exception ex) { logger.LogError(ex.Message); return(StatusCode(StatusCodes.Status500InternalServerError, ex.Message)); } }
public async Task <Boolean> DeleteZoneAsync(string zoneId) { return(await _zoneRepository.DeleteZoneAsync(zoneId)); }