コード例 #1
0
        public IActionResult Delete(int id)
        {
            var result = _service.DeleteById(id);

            if (result.Succeeded)
            {
                return(RedirectToAction("Index"));
            }
            ModelState.AddResultErrors(result);
            return(BadRequest(ModelState));
        }