Пример #1
0
        public async Task <bool> AcceptRental(Rental rental)
        {
            if (rental == null)
            {
                return(false);
            }

            rental.Accept();

            await rolesService.AdmitRole(rental.Owner, RoleName.RentalOwner);

            await notificationSystem.PushNotification(rental.OwnerId, StaticExpressions.RentalAccepted(rental.Name), NotificationType.Rental);

            return(true);
        }