public ViewCompetition(Competition competition) { InitializeComponent(); Title = "SRA - #" + competition.Id.ToString() + " « " + competition.Name + " »"; _competition = competition; TxBCompetitionName.Text = "« " + competition.Name + " »"; TxBStartDate.Text = competition.StartDate.ToString("d MMMM yyyy"); TxBEndDate.Text = competition.EndDate.ToString("d MMMM yyyy"); _resultsModel = new ResultsModel(competition.Id); _resultsModel.CreateIfDontExist(); _results = _resultsModel.GetAll <Result>(); DGResults.ItemsSource = _results; }