public IEnumerable <Resident> GetAllWithoutApartment(string user) { return(_context.Residents.Include("Apartment").Where(ResidentQueries.GetAllWithoutApartment(user)).OrderBy(x => x.Name)); }
public IEnumerable <Resident> GetAllInactive(string user) { return(_items.AsQueryable().Where(ResidentQueries.GetAllInactive(user))); }
public IEnumerable <Resident> GetAllInactive(string user) { return(_context.Residents.AsNoTracking().Where(ResidentQueries.GetAllInactive(user)).OrderBy(x => x.Name)); }
public IEnumerable <Resident> GetAllByApartment(string user, Guid id) { return(_context.Residents.Include("Apartment").AsNoTracking().Where(ResidentQueries.GetAllByApartment(user, id)).OrderBy(x => x.Name)); }
public void Should_Return_Active_Residents_To_PedroIvo() { var result = _items.AsQueryable().Where(ResidentQueries.GetAllActive("Pedro Ivo")); Assert.AreEqual(3, result.Count()); }
public void Should_Return_Inactive_Residents_To_UsuarioA() { var result = _items.AsQueryable().Where(ResidentQueries.GetAllInactive("Usuario A")); Assert.AreEqual(2, result.Count()); }
public void Should_Return_PedroIvo_Residents() { var result = _items.AsQueryable().Where(ResidentQueries.GetAll("Pedro Ivo")); Assert.AreEqual(5, result.Count()); }