public async Task HandleAsync(AddFriend command, ICorrelationContext context) { var model = new UsersFriends() { FriendId = command.FriendId, UserId = command.UserId }; await _usersFriendsRepository.AddFriend(model); }
public async Task HandleAsync(AddFriend command, ICorrelationContext context) { var model = new UsersFriends() { FriendId = command.FriendId, UserId = command.UserId }; await _usersFriendsRepository.AddFriend(model); await _busPublisher.PublishEventAsync( new FriendAdded() { Id = command.Id, FriendId = command.FriendId, UserId = command.UserId }, context); }