コード例 #1
0
        public async Task <IActionResult> DeleteAuthor(int id)
        {
            var result = await _authorBusiness.DeleteAuthor(id);

            if (result)
            {
                return(Ok("Deleted Successfully"));
            }
            return(NoContent());
        }
コード例 #2
0
        public async Task <IActionResult> Delete(int id)
        {
            await _authorBusiness.DeleteAuthor(id);

            return(RedirectToAction("Index"));
        }