Exemple #1
0
        public async Task <BusStopsBusStopDto> GetBusStopIncludeAllAsync(int id)
        {
            var busStop = await _repository.GetBusStopIncludeAllAsync(id);

            var punctualityPercentage = PunctualityConverter.BusStopPunctualityPercentage(busStop);
            var busStopDto            = new BusStopsBusStopDto()
            {
                PunctualityPercentage = punctualityPercentage
            };

            return(_mapper.Map <BusStop, BusStopsBusStopDto>(busStop, busStopDto));
        }
Exemple #2
0
        public async Task RemoveBusStopAsync(BusStopsBusStopDto busStop)
        {
            var busStopToRemove = await _repository.GetBusStopAsync(busStop.Id);

            await _repository.RemoveBusStopAsync(busStopToRemove);
        }