Ejemplo n.º 1
0
        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));
        }
Ejemplo n.º 3
0
        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);
        }
Ejemplo n.º 4
0
 public async Task Delete(int id)
 {
     await _service.Delete(id);
 }
Ejemplo n.º 5
0
        public IResponseDTO Delete(int id)
        {
            var result = ServicesCountry.Delete(id);

            return(result);
        }