Ejemplo n.º 1
0
        public virtual IActionResult Delete(TKey id)
        {
            var result = _service.DeleteById(id);

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