public IActionResult Delete(int id) { if (!ModelState.IsValid) { return(new BadRequestObjectResult(ModelState)); } else { _subService.Delete(id); return(new OkObjectResult(id)); } }