ActivEarth.DAO.TeamDAO.GetCompetitorCount C# (CSharp) Метод

GetCompetitorCount() публичный статический Метод

Retrieves the number of competitors for a contest.
public static GetCompetitorCount ( int contestId ) : int
contestId int ID of the contest.
Результат int
        public static int GetCompetitorCount(int contestId)
        {
            using (SqlConnection connection = ConnectionManager.GetConnection())
            {
                var data = new ActivEarthDataProvidersDataContext(connection);
                return (from c in data.TeamMemberDataProviders
                        where c.contest_id == contestId
                        select c.id).ToList().Count;
            }
        }