Beispiel #1
0
        public List <DTO.DriverDTO> GetDriverDTO()
        {
            List <DTO.DriverDTO> driverList = new List <DTO.DriverDTO>();

            foreach (var driver in db.GetListDriver("SELECT * FROM Driver"))
            {
                driverList.Add(new DTO.DriverDTO(driver.driverNumber, driver.driverName,
                                                 driver.driverSurname, driver.countryCode, driver.img,
                                                 db.GetListTeams($"SELECT * FROM Team WHERE teamCode='{driver.teamCode}';")[0].teamFullName));
            }
            return(driverList);
        }
 public List <Team> GetAllTeams()
 {
     return(db.GetListTeams("SELECT * FROM Team;"));
 }