public static string TestGetTeamWithMostPoints(IVersenyzoRepository vRepo, ICsapatRepository csRepo)
        {
            VersenyzoLogic verLogic = new VersenyzoLogic(vRepo);
            CsapatLogic    csLogic  = new CsapatLogic(csRepo);
            var            query    = from x in verLogic.GetAllVersenyzo()
                                      orderby x.ossz_pont descending
                                      join y in csLogic.GetAllCsapat() on x.csapat_nev equals y.csapat_nev
                                      group x by y.csapat_nev into g
                                      select new
            {
                CsapatNev = g.Key,
            };

            return(query.First().CsapatNev.ToString());
        }
Beispiel #2
0
 public CsapatLogic(ICsapatRepository repo)
 {
     this.csapatRepo = repo;
 }
Beispiel #3
0
 public CsapatLogic(string connectionPassword)
 {
     this.csapatRepo = new CsapatRepository(connectionPassword);
 }
Beispiel #4
0
 public CsapatLogic()
 {
     this.csapatRepo = new CsapatRepository(new F1StatsDatabaseEntities());
 }
        public static IList <string> TestGetResultWithEngineNames(int raceNumber, IEredmenyRepository eRepo, ICsapatRepository csRepo, IVersenyzoRepository vRepo)
        {
            EredmenyLogic  eredmenyRepo = new EredmenyLogic(eRepo);
            CsapatLogic    csapatLogic  = new CsapatLogic(csRepo);
            VersenyzoLogic vLogic       = new VersenyzoLogic(vRepo);
            var            query        = from x in eredmenyRepo.GetAllEredmeny()
                                          where x.versenyhetvege_szam == raceNumber
                                          join y in vLogic.GetAllVersenyzo() on x.rajtszam equals y.rajtszam
                                          join z in csapatLogic.GetAllCsapat() on y.csapat_nev equals z.csapat_nev
                                          orderby x.helyezes
                                          select z.motor;

            return(query.ToList());
        }