public List <DTO.TeamDTO> GetTeamDTO()
        {
            List <DTO.TeamDTO> teamList = new List <DTO.TeamDTO>();

            foreach (var team in db.GetListTeams("SELECT * FROM Team;"))
            {
                var driverResult = db.GetListDriver($"SELECT * FROM Driver WHERE teamCode='{team.teamCode}';");
                teamList.Add(new DTO.TeamDTO(driverResult[0], driverResult[1],
                                             team.teamFullName, team.logo, team.img));
            }
            return(teamList);
        }
        public IEnumerable <Driver> Get()
        {
            DbTools db = new DbTools();

            return(db.GetListDriver());
        }
Ejemplo n.º 3
0
 public List <Driver> GetAllDrivers()
 {
     return(db.GetListDriver("SELECT * FROM Driver"));
 }