Exemple #1
0
 public void Handle(PlaylistAdded evt)
 {
     if (_playlistRepository.Exists(evt.UserId))
     {
         _playlistRepository.Update(evt.UserId);
     }
     else
     {
         _playlistRepository.Add(evt.UserId, evt.PlaylistId, evt.Name);
     }
 }
Exemple #2
0
 private bool PlaylistAndTagExist(int playlistId, int tagId)
 {
     return(_playlistRepository.Exists(playlistId) && _tagRepository.Exists(tagId));
 }