public void SimpleStoreTest() { var config = new MeasurementStoreConfig() { StoreType = StoreType.MicrosoftSqlServer, ConnectionString = @"server=(localdb)\MSSqlLocalDb;Database=SimpleStoreTest" }; var trace = new Trace() { DataFileNameRelative = "xyz" }; var measurement = new CpuSampled() { ProcessName = "Foo", IsDpc = true, Count = 100, TotalSamplesDuringInterval = 1000, CpuCoreCount = 1 }; var measurement2 = new TraceAttribute() { Name = "FooA" }; trace.AddMeasurement(measurement); trace.AddMeasurement(measurement2); using (var store = new MeasurementStore(config)) { store.Database.EnsureCreated(); store.Database.EnsureDeleted(); store.Database.EnsureCreated(); Assert.True(store.SaveTraceAndMeasurements(trace) == 3); } }