Пример #1
0
        public virtual async Task <ActionResponse> Delete(
            int tweetId)
        {
            ActionResponse response = ValidationResponseFactory <object> .ActionResponse(await this.DirectTweetModelValidator.ValidateDeleteAsync(tweetId));

            if (response.Success)
            {
                await this.DirectTweetRepository.Delete(tweetId);

                await this.mediator.Publish(new DirectTweetDeletedNotification(tweetId));
            }

            return(response);
        }
Пример #2
0
        public virtual async Task <ActionResponse> Delete(
            int userId)
        {
            ActionResponse response = ValidationResponseFactory <object> .ActionResponse(await this.FollowingModelValidator.ValidateDeleteAsync(userId));

            if (response.Success)
            {
                await this.FollowingRepository.Delete(userId);

                await this.mediator.Publish(new FollowingDeletedNotification(userId));
            }

            return(response);
        }
Пример #3
0
        public virtual async Task <ActionResponse> Delete(
            int id)
        {
            ActionResponse response = ValidationResponseFactory <object> .ActionResponse(await this.MessengerModelValidator.ValidateDeleteAsync(id));

            if (response.Success)
            {
                await this.MessengerRepository.Delete(id);

                await this.mediator.Publish(new MessengerDeletedNotification(id));
            }

            return(response);
        }