public IActionResult Delete([FromRoute] int id) { var model = _planRepository.Get(id); if (model == null) { return(NotFound()); } _planRepository.Delete(id); return(NoContent()); }