Beispiel #1
0
        public async Task <IActionResult> DeleteConfirmed(int id)
        {
            var categorie = await _categorieService.GetByIdAsync(id);

            try
            {
                await _categorieService.DeleteAsync(categorie);
            }
            catch (System.Exception ex)
            {
                return(new GestionError().DisplayError(ex.InnerException.Message));
            }
            return(RedirectToAction(nameof(Index)));
        }