public void InsertStudent(StudentQueryItem studentItem) { User user = new User { UserName = studentItem.UserName, Password = studentItem.Password, UserTypeID = studentItem.UserTypeID }; Student student = new Student { StudentID = studentItem.StudentID, StudentFirstName = studentItem.StudentFirstName, StudentMiddleName = studentItem.StudentMiddleName, StudentLastName = studentItem.StudentLastName, StudentBirthDate = studentItem.StudentBirthDate, StudentEmail = studentItem.StudentEmail, Photo = studentItem.Photo }; StudentIntake studentIntake = new StudentIntake { StudentID = studentItem.StudentID, IntakeID = studentItem.IntakeID, IsStudentIntakeActive = studentItem.IsStudentIntakeActive }; _studentDal.InsertStudent(user, student, studentIntake); }