コード例 #1
0
        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));
        }
コード例 #2
0
        public async Task <IActionResult> DeleteCatalog(string id)
        {
            await _catalogService.DeleteCatalog(id);

            return(Ok());
        }
コード例 #3
0
 public async Task <ActionResult <bool> > Delete(int Id)
 {
     return(await _catalogService.DeleteCatalog(Id));
 }
コード例 #4
0
 public ActionResult DeleteConfirmed(string code)
 {
     _catalogService.DeleteCatalog(code);
     return(RedirectToAction("Index"));
 }