async Task <ReturnBikeResponseModel> IBikeApplicationService.Return(Guid bikeId, Guid userId) { var price = await _priceRepository.GetValue(); var borrowHours = await _borrowRepository.GetBorrowHours(bikeId); if (price == -1 || borrowHours == -1) { return(null); } var card = await _identityInterop.GetCardEndNumbers(userId); var returnBikeResponseModel = new ReturnBikeResponseModel(borrowHours, price, card?.EndCardNumber); await _bikeRepository.SetActive(bikeId); var user = await _identityInterop.GetUserInfo(userId); await _busManager.SendMessage( ReturnEmailDto.Create(user.FullName, user.Email, (returnBikeResponseModel.Hours *returnBikeResponseModel.Price).ToString()), "email_exchange"); return(returnBikeResponseModel); }