Пример #1
0
        public async Task <IActionResult> GetByClienteId(int id)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState.GetErrorResponse()));
            }

            var result = await _service.GetByClienteId(id);

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

            return(Ok(result));
        }