private void btnKaydet_Click(object sender, EventArgs e) { var student = new Student(); student.Firstname = textBox1.Text; student.Lastname = textBox2.Text; _serviceStudent.Insert(student); Clear(); GetData(); }
static void InsertStudent() { var student = new Student { Firstname = "Mehmet", Lastname = "Yıldız" }; _serviceStudent.Insert(student); var addedStudent = _serviceStudent.GetById(student.Id); Console.WriteLine("Insert Test --> Firstname:{0} Lastname:{1} Id:{2}", addedStudent.Firstname, addedStudent.Lastname, addedStudent.Id); }