public ActionResult DeleteEnvironmentId(int?id) { if (id == null) { return(NoContent()); } _service.Delete((int)id); return(Ok()); }
public IActionResult Delete(int id) { bool resultDelete = _service.Delete(id); if (!resultDelete) { throw new InvalidOperationException(string.Format( "The environment with an ID of '{0}' could not be found. Make sure that environment exists.", id)); } return(Ok()); }
public IActionResult Delete(Guid id) { return(Ok(_service.Delete(id))); }
public async Task <IActionResult> Delete(Guid environmentId) { await _environmentService.Delete(environmentId); return(Ok()); }