public MainWindow()
 {
     using (ElectionContext db = new ElectionContext())
     {
         Candidate c1 = new Candidate {
             Name = "Alex", Surname = "Lukashenko", Rating = 35
         };
         Candidate c2 = new Candidate {
             Name = "Zianon", Surname = "Pozniak", Rating = 65
         };
         Candidate c3 = new Candidate {
             Name = "Maria", Surname = "Vasilevish", Rating = 0
         };
         db.Candidates.AddRange(new List <Candidate>()
         {
             c1, c2, c3
         });
         Confident conf1 = new Confident {
             FullName = "Alex Matskevich", Age = 40, PoliticalPreferences = "Neutral", Candidate = c1
         };
         Confident conf2 = new Confident {
             FullName = "Karyna Kluchnik", Age = 18, PoliticalPreferences = "Monarch", Candidate = c2
         };
         Confident conf3 = new Confident {
             FullName = "Tanya Verbovich", Age = 25, PoliticalPreferences = "Liberal", Candidate = c2
         };
         db.Confidents.AddRange(new List <Confident>()
         {
             conf1, conf2, conf3
         });
         Promise prom1 = new Promise {
             Text = "Stop War"
         };
         Promise prom2 = new Promise {
             Text = "Increase revenue"
         };
         prom1.Candidates.Add(c1);
         prom2.Candidates.Add(c1);
         prom2.Candidates.Add(c2);
         db.Promises.AddRange(new List <Promise> {
             prom1, prom2
         });
         db.SaveChanges();
         CandidateProfile prof1 = new CandidateProfile {
             Id = c1.Id, Age = 50, Description = "Current president"
         };
         CandidateProfile prof2 = new CandidateProfile {
             Id = c2.Id, Age = 40, Description = "Legend"
         };
         db.CandidateProfiles.AddRange(new List <CandidateProfile> {
             prof1, prof2
         });
         db.SaveChanges();
     }
     InitializeComponent();
 }
 private void updateButton_Click(object sender, RoutedEventArgs e)
 {
     curCont.SaveChanges();
 }