Пример #1
0
        //To Get the list of Playable teams
        public List <TblTeams> GetPlayableTeams()
        {
            game_dbContext        context = new game_dbContext();
            IQueryable <TblTeams> team    = context.TblTeams.FromSqlRaw($"SELECT tblTeams.TeamID,tblTeams.TeamName FROM tblTeams JOIN tblPlayer ON tblTeams.TeamName = tblPlayer.team GROUP BY tblTeams.TeamID, tblTeams.TeamName HAVING COUNT(tblPlayer.team) >= 5");
            List <TblTeams>       lstTeam = team.ToList();

            return(lstTeam);
        }