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)); }
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)); }
public ActionResult DeleteConfirmed(string code) { _catalogService.DeleteCatalog(code); return(RedirectToAction("Index")); }