Exemplo n.º 1
0
        private void UpdateLastBloodNotificationDonatorUser(Guid donatorUserId)
        {
            var donatorUser = _donatorUserRepository.GetById(donatorUserId);

            donatorUser.AddLastBloodNotification();
            _donatorUserRepository.Update(donatorUser);
        }
        public async Task <ICommandResult> Handle(UpdateDonatorUserCommand command, CancellationToken cancellationToken)
        {
            var donatorUser = _donatorUserRepository.GetById(command.Id);

            donatorUser.AddCellPhone(command.CellPhone);

            _donatorUserRepository.Update(donatorUser);

            DeleteUserSocialNotificationTypes(donatorUser.UserId);
            AddUserSocialNotificationTypes(donatorUser.UserId, command.SocialNotificationTypesId);

            Commit();

            return(await CompletedTask(donatorUser));
        }