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()); }
public void SeedSaveIntoDB() { _studentUnitOfWork.Save(); }