public void Drop()
 {
     if (_inmemoryCollection.IsActive)
     {
         _inmemoryCollection.Clear();
     }
     _storage.Drop();
 }
 public async Task DropAsync()
 {
     if (_inmemoryCollection.IsActive)
     {
         _inmemoryCollection.Clear();
         _indexes.Clear();
     }
     await _storage.DropAsync().ConfigureAwait(false);
 }
Ejemplo n.º 3
0
        public void clear_should_remove_all_models()
        {
            var model = new SampleReadModelWithStringKey()
            {
                Id = "a"
            };

            _inmemoryCollection.Save(model);

            _inmemoryCollection.Clear();

            Assert.AreEqual(0, _inmemoryCollection.GetAll().Count());
        }