public async Task <IList <NotificationSharedUser> > HandleAsync(GetSharedUsersByNotificationId message) { var sharedUsers = await repository.GetAllSharedUsers(message.NotificationId); return(sharedUsers .Select(sharedUser => mapper.Map <NotificationSharedUser>(sharedUser)) .ToList()); }
public async Task <bool> HandleAsync(CheckIfSharedUserExists message) { var sharedUsers = await repository.GetAllSharedUsers(message.NotificationId); return(sharedUsers.Any()); }