コード例 #1
0
        public async Task <IActionResult> DeleteLevel(int id)
        {
            var deleted = await _levelBusiness.DeleteLevel(id);

            if (deleted)
            {
                return(Ok("deleted successfully"));
            }
            return(BadRequest());
        }
コード例 #2
0
        public async Task <IActionResult> Remove(int id)
        {
            await _levelBusiness.DeleteLevel(id);

            return(RedirectToAction("GetAllLevels"));
        }