Esempio n. 1
0
        void CheckFavBook(FavoriteDTO book)
        {
            List <FavoriteDTO> favs = _BookManagement.GetAllFavDTOs();

            foreach (FavoriteDTO item in favs)
            {
                if (item.BookID == book.BookID && item.UserID == book.UserID)
                {
                    throw new AlreadyAddedException();
                }
            }
        }