Esempio n. 1
0
 public Favourite AddFavourite(Favourite favourite)
 {
     var favouriteAvailibilityStatus = favouriteRepository.GetFavouriteByTitle(favourite);
     if (favouriteAvailibilityStatus.Count==0)
     {
         return favouriteRepository.AddFavourite(favourite);
     }
     else
     {
         throw new FavouriteAlreadyExistsException("Favorite already exists");
     }
 }