Ejemplo n.º 1
0
        public async Task <IActionResult> GetRidesInRotaAsync(string beginning, string destination)
        {
            var result = await rotaService.FindRidesInRota(beginning, destination);

            if (result.Success)
            {
                var itemViewModels = mapper.Map <List <RideViewModel> >(result.Data);
                return(Ok(itemViewModels));
            }

            return(BadRequest(result.Message));
        }