Exemplo n.º 1
0
        public void Should_DeleteByQuery()
        {
            // Arrange
            var entities = FakeEntity.FakeEntities();
            IRepository <FakeEntity> repository = new CacheRepository <FakeEntity>(entities);
            var query = repository.Query().IsNotDeleted();

            // Act
            repository.Delete(UserId, query);

            // Assert
            foreach (var entity in entities)
            {
                Assert.IsFalse(repository.Exists(entity.Id));
            }
        }
Exemplo n.º 2
0
 // GET: ManageUsers
 public ActionResult Index()
 {
     //_repo.Query<Identity.Models.ApplicationUser>().ToList()
     return(View(_repo.Query <ApplicationUser>().ToList()));
 }