示例#1
0
        public async Task <ActionResult <Mode> > DeleteMode(Guid id)
        {
            var mode = await _modeService.DeleteModeAsync(id);

            if (mode == null)
            {
                return(NotFound());
            }

            return(mode);
        }
示例#2
0
        public async Task <IActionResult> OnPost(Guid id)
        {
            if (id == null)
            {
                return(BadRequest());
            }

            await _modeService.DeleteModeAsync(id);

            return(RedirectToPage("./Modes"));
        }