public async Task <IActionResult> Delete(int id)
        {
            if (!User.Identity.IsAuthenticated)
            {
                throw new AuthenticationException();
            }
            var result = await _catalogService.DeleteCatalog(id);

            var response = new ApiResponse <bool>(result);

            return(Ok(response));
        }
Exemplo n.º 2
0
        public async Task <IActionResult> DeleteCatalog(string id)
        {
            await _catalogService.DeleteCatalog(id);

            return(Ok());
        }
 public async Task <ActionResult <bool> > Delete(int Id)
 {
     return(await _catalogService.DeleteCatalog(Id));
 }
Exemplo n.º 4
0
 public ActionResult DeleteConfirmed(string code)
 {
     _catalogService.DeleteCatalog(code);
     return(RedirectToAction("Index"));
 }