ActivEarth.DAO.ChallengeDAO.GetStatisticFromChallengeId C# (CSharp) Метод

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

Lookup for the statistic being tracked by a specific challenge.
public static GetStatisticFromChallengeId ( int challengeId ) : Statistic
challengeId int ID of the challenge to query.
Результат Statistic
        public static Statistic GetStatisticFromChallengeId(int challengeId)
        {
            using (SqlConnection connection = ConnectionManager.GetConnection())
            {
                var data = new ActivEarthDataProvidersDataContext(connection);
                return (Statistic)(from c in data.ChallengeDataProviders
                                      where c.id == challengeId
                                      select c.statistic).FirstOrDefault();
            }
        }