コード例 #1
0
        public IActionResult AddStudent()
        {
            var course = new Course()
            {
                Name = "Database Design"
            };
            var student = new Student()
            {
                Name = "Mahmudul Hasan"
            };

            var studentCourse = new StudentCourse()
            {
                Student = student, Course = course
            };

            _studentUnitOfWork.StudentRepository.Add(studentCourse);

            _studentUnitOfWork.Save();


            return(View());
        }
コード例 #2
0
 public void SeedSaveIntoDB()
 {
     _studentUnitOfWork.Save();
 }