Esempio n. 1
0
 public IEnumerable <Resident> GetAllWithoutApartment(string user)
 {
     return(_context.Residents.Include("Apartment").Where(ResidentQueries.GetAllWithoutApartment(user)).OrderBy(x => x.Name));
 }
Esempio n. 2
0
 public IEnumerable <Resident> GetAllInactive(string user)
 {
     return(_items.AsQueryable().Where(ResidentQueries.GetAllInactive(user)));
 }
Esempio n. 3
0
 public IEnumerable <Resident> GetAllInactive(string user)
 {
     return(_context.Residents.AsNoTracking().Where(ResidentQueries.GetAllInactive(user)).OrderBy(x => x.Name));
 }
Esempio n. 4
0
 public IEnumerable <Resident> GetAllByApartment(string user, Guid id)
 {
     return(_context.Residents.Include("Apartment").AsNoTracking().Where(ResidentQueries.GetAllByApartment(user, id)).OrderBy(x => x.Name));
 }
Esempio n. 5
0
        public void Should_Return_Active_Residents_To_PedroIvo()
        {
            var result = _items.AsQueryable().Where(ResidentQueries.GetAllActive("Pedro Ivo"));

            Assert.AreEqual(3, result.Count());
        }
Esempio n. 6
0
        public void Should_Return_Inactive_Residents_To_UsuarioA()
        {
            var result = _items.AsQueryable().Where(ResidentQueries.GetAllInactive("Usuario A"));

            Assert.AreEqual(2, result.Count());
        }
Esempio n. 7
0
        public void Should_Return_PedroIvo_Residents()
        {
            var result = _items.AsQueryable().Where(ResidentQueries.GetAll("Pedro Ivo"));

            Assert.AreEqual(5, result.Count());
        }