public static bool IsAssociatedWithRooms(int officeId, IService service) { ConfigurationRepository roomRepository = RepositoryFactory.GetConfigurationRepository <Room>(service); var allRooms = roomRepository.GetAll <Room>(); foreach (Room room in allRooms) { if (room.OfficeId == officeId) { return(true); } } return(false); }
public void GetAll() { // Arrange ConfigurationRepository repository = new ConfigurationRepository(); // Act Configurations result = repository.GetAll(100000, 0); // Assert Assert.IsNotNull(result); Assert.IsNotNull(result.configurations); int count = 0; foreach (Configuration c in result.configurations) { count++; } Assert.AreEqual(count, 2); }
public IActionResult GetAll() { var list = _repoConfiguration.GetAll(); return Ok(list); }
public List <Configuration> GetAll() { return(_configRepository.GetAll()); }