Esempio n. 1
0
 public void InsertStudent(Student student)
 {
     _repository.InsertStudent(student);
 }
 public void InsertStudent(Student student)
 {
     using (var connection = ConnFactory.CreateOpenConnection())
     using (var command = CmdFactory.CreateStoredProcedure(connection, "sp_InsertStudent",
         new SqlParameter("@FirstName", student.FirstName),
         new SqlParameter("@LastName", student.LastName),
         new SqlParameter("@DateOfBirth", student.DateOfBirth)))
     {
         command.ExecuteNonQuery();
     }
 }