Пример #1
0
 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)
 {
 }
Пример #4
0
 public StatusRepository(TryLogContext context) : base(context)
 {
 }
 public EventRepository(TryLogContext dbContext)
 {
     _dbContext = dbContext;
 }
Пример #6
0
 public EnvironmentRepository(TryLogContext context) : base(context)
 {
 }
Пример #7
0
 public SeverityRepository(TryLogContext context) : base(context)
 {
 }