Ejemplo n.º 1
0
        private void button1_Click(object sender, EventArgs e)
        {
            List <Person> people = new List <Person>();

            context.People.Add(new Person
            {
                Name     = txbx_name.Text,
                Surname  = txbx_surname.Text,
                Email    = txbx_email.Text,
                Password = txbx_password.Text
            });
            context.SaveChanges();
            var data = dBQuery.ByEmailUser(txbx_email.Text);

            SessionDb.Session.People = data;
            context.RegisterPhones.Add(new RegisterPhoneNumber
            {
                NumberPhone = txbx_number.Text,
                PersonId    = data.Select(x => x.Id).FirstOrDefault()
            });
            context.SaveChanges();
            MessageBox.Show("Tebrikler Qeydiyyatdan kecdiniz");
        }