public void AddTest() { var random = new Random(); Qualification = QualificationsService.GetAllQualifications()[random.Next(10)]; Course = CourseService.GetAllCourses()[random.Next(100)]; QualificationDevelopedByCourse = QualificationDevelopedByCourseService.Add( new QualificationDevelopedByCourse() { Course = Course, CourseId = Course.Id, Qualification = Qualification, QualificationId = Qualification.Id }); }
public QualificationDevelopedByCourse Add(QualificationDevelopedByCourse qualificationDevelopedByCourse) { context.QualificationsDevelopedByCourse.Add(qualificationDevelopedByCourse); context.SaveChanges(); return(qualificationDevelopedByCourse); }