public static void Seed(IDocumentStore store) { using (var db = store.OpenSession()) { var s = new Seeder(db, new RecordService(db, new RecordValidator())); var timeGetter = Clock.CurrentUtcDateTimeGetter; Clock.CurrentUtcDateTimeGetter = () => new DateTime(2015, 1, 1, 12, 0, 0); s.AddVocabularies(); s.AddMeshRecords(); s.AddHumanActivitiesRecord(); s.AddOverseasTerritoriesRecord(); s.AddSimpleGeminiExampleRecord(); s.AddRecordsWithOpenDataPublishingInfo(); s.AddRecordWithLotsOfVocablessTags(); s.AddReadOnlyRecord(); s.AddNonGeographicDataset(); s.AddSecureRecords(); s.AddNonTopCopyRecord(); s.AddVariousDataFormatRecords(); s.AddRecordWithUnusualCharactersInKeywords(); s.AddTwoRecordsWithTheSameBoundingBox(); s.AddBboxes(); s.AddDatesForTimeline(); db.SaveChanges(); Clock.CurrentUtcDateTimeGetter = timeGetter; } }
public static void Seed(IDocumentStore store) { using (var db = store.OpenSession()) { var s = new Seeder(db, new RecordService(db, new RecordValidator())); s.AddVocabularies(); s.AddMeshRecords(); s.AddHumanActivitiesRecord(); s.AddOverseasTerritoriesRecord(); s.AddSimpleGeminiExampleRecord(); s.AddRecordsWithPublishingInfo(); s.AddRecordWithLotsOfVocablessTags(); s.AddReadOnlyRecord(); s.AddNonGeographicDataset(); s.AddSecureRecords(); s.AddNonTopCopyRecord(); s.AddVariousDataFormatRecords(); s.AddRecordWithUnusualCharactersInKeywords(); s.AddTwoRecordsWithTheSameBoundingBox(); s.AddBboxes(); db.SaveChanges(); } }