public CooperatorsRepository()
        {
            _db = new KeepContext(
                new DbContextOptionsBuilder <KeepContext>()
                .UseInMemoryDatabase("keepDB")
                .Options);

            InitializeData();
        }
 protected virtual void Dispose(bool disposing)
 {
     if (!disposedValue)
     {
         if (disposing)
         {
             if (_db != null)
             {
                 _db.Dispose();
                 _db = null;
             }
         }
         disposedValue = true;
     }
 }
 public CooperatorsRepository(IKeepContext db)
 {
     _db = (KeepContext)db;
 }
Example #4
0
 public CardsRepository(IKeepContext db)
 {
     _db = (KeepContext)db;
 }