Exemplo n.º 1
0
        public async Task <IActionResult> AddToAgency(AddAgentToAgencyCommand command)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }
            try
            {
                var result = await _agentService.AddAgentToAgency(command);

                return(Ok(result));
            }
            catch (NotFoundException <Guid> )
            {
                return(NotFound());
            }
        }