예제 #1
0
        public async Task <IActionResult> GetById([FromRoute] int id)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }
            var transit = await _transitRepository.GetAsync(id);

            if (transit != null)
            {
                return(Ok(transit));
            }
            else
            {
                return(BadRequest());
            }
        }