No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

ScratchDatabaseFixture.cs 623 B

hace 7 años
hace 7 años
hace 7 años
12345678910111213141516171819202122
  1. using System;
  2. using Microsoft.EntityFrameworkCore.Internal;
  3. namespace Cap.Consistency.EntityFrameworkCore.Test
  4. {
  5. public class ScratchDatabaseFixture : IDisposable
  6. {
  7. private LazyRef<SqlServerTestStore> _testStore;
  8. public ScratchDatabaseFixture() {
  9. _testStore = new LazyRef<SqlServerTestStore>(() => SqlServerTestStore.CreateScratch());
  10. }
  11. public string ConnectionString => _testStore.Value.Connection.ConnectionString;
  12. public void Dispose() {
  13. if (_testStore.HasValue) {
  14. _testStore.Value?.Dispose();
  15. }
  16. }
  17. }
  18. }