Esempio n. 1
0
        public async Task <IActionResult> Get([FromQuery] StateRequest data)
        {
            var msg      = new StateFindAllMsgToApi(data);
            var response = await searchState.handleAsync(msg);

            if (!response.Any())
            {
                return(NoContent());
            }

            var responseApi = new List <StateResponse>(response);

            return(Ok(responseApi));
        }
        /// <summary>
        ///
        /// </summary>
        public async Task <List <StateResponse> > handleAsync(StateFindAllMsgToApi request)
        {
            var result = await searchState.findAll(request.filter);

            return(result);
        }