Пример #1
0
        private void btnIdyeGoreGetir_Click(object sender, EventArgs e)
        {
            var st = _serviceStudent.GetById((int)numericUpDown1.Value);

            if (st == null)
            {
                MessageBox.Show("Kayıt yok");
            }
            else
            {
                MessageBox.Show(st.Firstname + " " + st.Lastname);
            }
        }
Пример #2
0
        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);
        }