public void FillWith <T>() where T : class { using (var context = new TryLogContext(FakeOptions)) { if (context.Set <T>().Count() == 0) { foreach (T item in Get <T>()) { context.Set <T>().Add(item); } context.SaveChanges(); } } }
public AbstractRepository(TryLogContext context) { _context = context; }
public LogRepository(TryLogContext context) : base(context) { }
public StatusRepository(TryLogContext context) : base(context) { }
public EventRepository(TryLogContext dbContext) { _dbContext = dbContext; }
public EnvironmentRepository(TryLogContext context) : base(context) { }
public SeverityRepository(TryLogContext context) : base(context) { }