Example #1
0
        public async Task ImportLibrary(ExportedLibraryDto dto)
        {
            var resetConnection = !DataAccessUtil.UsePersistentConnection;

            DataAccessUtil.UsePersistentConnection = true;

            await UpsertFiles(dto);

            UpsertTags(dto);

            libraryId = UpsertLibrary(dto);
            await ImportEntities(dto);
            await ImportRelationships(dto);

            if (resetConnection)
            {
                DataAccessUtil.ClosePersistentConnection();
                DataAccessUtil.UsePersistentConnection = false;
            }
        }