Exemplo n.º 1
0
        public IQueryable <Customer> GetAll()
        {
            var customerList = new List <Customer>();

            _sqlToExecute = "SELECT * FROM [dbo].[Customer]";

            if (!_dataEngine.CreateReaderFromSql(_sqlToExecute))
            {
                throw new Exception("Customer - GetAll failed");
            }

            while (_dataEngine.Dr.Read())
            {
                Customer customer = CreateCustomerFromData();
                customerList.Add(customer);
            }

            return(customerList.AsQueryable());
        }
Exemplo n.º 2
0
        public IQueryable <Location> GetAll()
        {
            var locationList = new List <Location>();

            _sqlToExecute = "SELECT * FROM [dbo].[Location]";

            if (!_dataEngine.CreateReaderFromSql(_sqlToExecute))
            {
                throw new Exception("Location - GetAll failed");
            }

            while (_dataEngine.Dr.Read())
            {
                var location = CreateLocationFromData();
                locationList.Add(location);
            }

            return(locationList.AsQueryable());
        }
        public IQueryable <Address> GetAll()
        {
            var addressList = new List <Address>();

            _sqlToExecute = "SELECT * FROM [dbo].[Address]";

            if (!_dataEngine.CreateReaderFromSql(_sqlToExecute))
            {
                throw new Exception("Address - GetAll failed");
            }

            while (_dataEngine.Dr.Read())
            {
                Address address = CreateAddressFromData();
                addressList.Add(address);
            }

            return(addressList.AsQueryable());
        }
Exemplo n.º 4
0
        public IQueryable <CourtBookingSheet> GetAll()
        {
            var courtBookingSheetList = new List <CourtBookingSheet>();

            _sqlToExecute = "SELECT * FROM [dbo].[CourtBookingSheet]";

            if (!_dataEngine.CreateReaderFromSql(_sqlToExecute))
            {
                throw new Exception("CourtBookingSheet - GetAll failed");
            }

            while (_dataEngine.Dr.Read())
            {
                CourtBookingSheet courtBookingSheet = CreateCourtBookingSheetRecordFromData();
                courtBookingSheetList.Add(courtBookingSheet);
            }

            return(courtBookingSheetList.AsQueryable());
        }
        public IQueryable <Member> GetAll()
        {
            var memberList = new List <Member>();

            _sqlToExecute = "SELECT * FROM [dbo].[Member]";

            if (!_dataEngine.CreateReaderFromSql(_sqlToExecute))
            {
                throw new Exception("Member - GetAll failed");
            }

            while (_dataEngine.Dr.Read())
            {
                Member member = CreateMemberFromData();
                memberList.Add(member);
            }

            return(memberList.AsQueryable());
        }
Exemplo n.º 6
0
        public IQueryable <FacilitySchedule> GetAll()
        {
            var facilityScheduleList = new List <FacilitySchedule>();

            _sqlToExecute = "SELECT * FROM [dbo].[FacilitySchedule]";

            if (!_dataEngine.CreateReaderFromSql(_sqlToExecute))
            {
                throw new Exception("FacilitySchedule - GetAll failed");
            }

            while (_dataEngine.Dr.Read())
            {
                FacilitySchedule facilitySchedule = CreateFacilityScheduleFromData();
                facilityScheduleList.Add(facilitySchedule);
            }

            return(facilityScheduleList.AsQueryable());
        }