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

GetContestIdsFromUserId() 공개 정적인 메소드

Returns the list of IDs of all contests that a user is currently participating in.
public static GetContestIdsFromUserId ( int userId ) : List
userId int ID of the user to search for.
리턴 List
        public static List<int> GetContestIdsFromUserId(int userId)
        {
            using (SqlConnection connection = ConnectionManager.GetConnection())
            {
                var data = new ActivEarthDataProvidersDataContext(connection);
                return (from c in data.TeamMemberDataProviders
                        where c.user_id == userId
                        select c.contest_id).ToList();
            }
        }