ActivEarth.DAO.ContestDAO.GetStatisticFromContestId C# (CSharp) 메소드

GetStatisticFromContestId() 공개 정적인 메소드

Lookup for the statistic being tracked by a specific challenge.
public static GetStatisticFromContestId ( int contestId ) : Statistic
contestId int ID of the contest to query.
리턴 Statistic
        public static Statistic GetStatisticFromContestId(int contestId)
        {
            using (SqlConnection connection = ConnectionManager.GetConnection())
            {
                var data = new ActivEarthDataProvidersDataContext(connection);
                return (Statistic)(from c in data.ContestDataProviders
                                   where c.id == contestId
                                   select c.statistic).FirstOrDefault();
            }
        }