protected virtual void Dispose(bool disposing) { if (_objectDisposed) { return; } if (disposing) { Context.Dispose(); Context = null; } _objectDisposed = true; }
public BaseRepositoryFixture() { var directory = Directory.GetCurrentDirectory().Replace("bin\\Debug\\netcoreapp2.1", string.Empty); // get the configuration from the app settings var config = new ConfigurationBuilder() .SetBasePath(directory) .AddJsonFile("appsettings.json") .Build(); // define the database to use var optionsBuilder = new DbContextOptionsBuilder <PaylocityContext>(); optionsBuilder.EnableSensitiveDataLogging(); optionsBuilder.UseSqlServer(config.GetConnectionString("PaylocityConnection")); Context = new PaylocityContext(optionsBuilder.Options); }
public EmployeeHelper(PaylocityContext context) { _context = context; }
public DependentHelper(PaylocityContext context) { _context = context; }
public EmployeeRepository(PaylocityContext context) { _context = context; }
public DependentRepository(PaylocityContext context) { _context = context; }