Ejemplo n.º 1
0
 public void InsertStudent(Student student)
 {
     _repository.InsertStudent(student);
 }
Ejemplo n.º 2
0
 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();
     }
 }