protected virtual void Dispose(bool disposing) { if (disposing && _context != null) { _context.Dispose(); _context = null; } }
private void CreateTestData(NycLandmarkContext dbContext) { var boroughs = EnumHelper.EnumToList <Borough>().Select(e => e.GetDescription()); var objectTypes = EnumHelper.EnumToList <ObjectType>().Select(e => e.GetDescription()); var i = 0; GenFu.GenFu.Configure <LpcReport>() .Fill(l => l.Id, () => ++ i) .Fill(l => l.LPNumber, () => $"LP-{i,5:D5}") .Fill(l => l.LPCId, () => $"{i,5:D5}") .Fill(l => l.Borough, () => BaseValueGenerator.GetRandomValue(boroughs)) .Fill(l => l.ObjectType, () => BaseValueGenerator.GetRandomValue(objectTypes)) .Fill(l => l.Landmarks); _lpcReports = GenFu.GenFu.ListOf <LpcReport>(20); dbContext.LPCReports.AddRange(_lpcReports); dbContext.SaveChanges(); }
public LpcLocationRepositoryTest(CoreDataStoreDbFixture fixture, ITestOutputHelper output) { _dbContext = fixture.DbContext; _lpcLocationRepository = fixture.LpcLocationRepository; _output = output; }
public LpcReportRepository(NycLandmarkContext context) : base(context) { _context = context; }
public LpcLocationRepository(NycLandmarkContext context) : base(context) { }
public PlutoRepository(NycLandmarkContext context) : base(context) { _context = context; }
public LpcLamppostRepository(NycLandmarkContext context) : base(context) { }
public LandmarkRepository(NycLandmarkContext context) : base(context) { }
public LandmarkRepositoryTest(CoreDataStoreDbFixture fixture, ITestOutputHelper output) { _landmarkRepository = fixture.LandmarkRepository; _dbContext = fixture.DbContext; _output = output; }