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()); }
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()); }
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()); }
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()); }