Пример #1
0
        public IActionResult GetCompany([FromRoute] int id)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            var company = _companyRepo.GetId(id);

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

            return(Ok(company));
        }