Esempio n. 1
0
        private void CreateIndices()
        {
            var b       = new TagReference();
            var idField = RuntimeHelper.GetPropertyName(() => b.Id);

            fileAdapter.CreateIndex(idField);
            referenceAdapters.ArtistAdapter.CreateIndex(idField);
            referenceAdapters.YearAdapter.CreateIndex(idField);
            referenceAdapters.GenreAdapter.CreateIndex(idField);
            referenceAdapters.AlbumAdapter.CreateIndex(idField);
            referenceAdapters.TitleAdapter.CreateIndex(idField);
            var instance = new StorableTaggedFile();

            fileAdapter.CreateIndex(RuntimeHelper.GetPropertyName(() => instance.GenreId),
                                    RuntimeHelper.GetPropertyName(() => instance.AlbumId),
                                    RuntimeHelper.GetPropertyName(() => instance.ArtistId),
                                    RuntimeHelper.GetPropertyName(() => instance.TitleId),
                                    RuntimeHelper.GetPropertyName(() => instance.YearId));
        }