public async Task <IActionResult> DeleteCountry(int id) { var country = services.Find(id); if (country == null) { return(NotFound()); } await services.Delete(id); return(NoContent()); }
public async Task <ActionResult> Delete(long id) { #region Start the watch var watch = new Stopwatch(); watch.Start(); #endregion var result = await _entityServices.Delete(id); #region End the watch watch.Stop(); result.Meta.TotalProcessingTime = watch.ElapsedMilliseconds; #endregion return(Ok(result)); }
private bool InitDelete(long ID) { bool ok = false; try { if (ID != 0) { ok = CountryServices.Delete(ID); } } catch (Exception ex) { MessageBox.Show(ex.Message, "Notification", MessageBoxButton.OK); } return(ok); }
public async Task Delete(int id) { await _service.Delete(id); }
public IResponseDTO Delete(int id) { var result = ServicesCountry.Delete(id); return(result); }