public SurveyPage() { InitializeComponent(); List <Survey> survey = SurveyHelper.GetContext().Survey.ToList(); SurveyResult result = new SurveyResult() { MaleSum = survey.Where(n => n.Gender == "M").Count(), FemaleSum = survey.Where(n => n.Gender == "F").Count() }; GenderData.Items.Add(result); }