async Task IBikeApplicationService.UpdateBikePosition(Guid bikeId, BikePositionDto bikePositionDto) { var bike = await _bikeRepository.GetBikeBy(bikeId); bike.UpdateBikePosition(bikePositionDto); await _bikeRepository.UpdateBike(bike); }
private async Task <UserBorrowDto> CreateUserBorrowHistory(Borrow borrow) { var price = _priceRepository.GetPriceBy(borrow.PriceId); var bike = await _bikeRepository.GetBikeBy(borrow.BikeId); return(UserBorrowDto.Create(bike, borrow, price)); }