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); }
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); }
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); }