Example #1
0
        public async Task <ActionResult> Remove(int Id)
        {
            try
            {
                await _service.Remove(Id);

                return(RedirectToAction(nameof(Index)));
            }
            catch (DbUpdateException e)
            {
                TempData["ErrorMessage"] = e.Message;
                return(new HttpStatusCodeResult(HttpStatusCode.InternalServerError, e.Message));
            }
        }
        public async Task <ActionResult> Remove(int id)
        {
            await _CreditCardService.Remove(id);

            return(NoContent());
        }