예제 #1
0
        /// <inheritdoc />
        public async Task AddShowLink(int showID, int?libraryID, int?collectionID)
        {
            if (collectionID != null)
            {
                await _database.AddLinks <Collection, Show>(collectionID.Value, showID);

                await _database.SaveIfNoDuplicates();

                if (libraryID != null)
                {
                    await _database.AddLinks <Library, Collection>(libraryID.Value, collectionID.Value);

                    await _database.SaveIfNoDuplicates();
                }
            }
            if (libraryID != null)
            {
                await _database.AddLinks <Library, Show>(libraryID.Value, showID);

                await _database.SaveIfNoDuplicates();
            }
        }