public IEnumerable <RoomBLL> findByState(string state) { PGRoomRepository repository = repositoryFactory.getRoomRepository(); IEnumerable <RoomDAL> list = repository.findByState(state); return(list.Select(r => new RoomBLL { number = r.number, stage = r.stage, state = r.state, block = r.block, capacity = r.capacity, amountOfStudents = r.amountOfStudents })); }