public List <DomainModel.BusinessObject.Module> GetGameModule(Games game) { List <DomainModel.BusinessObject.Module> modules = new List <DomainModel.BusinessObject.Module>(); List <DatabaseModel.Module> gameModule = (from l in _dbx.Modules where l.GameId == game.Id select l).ToList(); foreach (DatabaseModel.Module module in gameModule) { DomainModel.BusinessObject.Module moduleDomain = new DomainModel.BusinessObject.Module(); moduleDomain.Id = module.Id; moduleDomain.ModuleName = module.ModuleName; moduleDomain.ModuleId = module.ModuleId; DomainModel.BusinessObject.Games gameDomain = new DomainModel.BusinessObject.Games(); gameDomain.Id = module.Game.Id; gameDomain.GameName = module.Game.gameName; moduleDomain.Game = gameDomain; modules.Add(moduleDomain); } return(modules); }
public void AddStudentCourse(DomainModel.BusinessObject.Student student, DomainModel.BusinessObject.GameCoding gameCoding, DomainModel.BusinessObject.Module module) { DatabaseModel.StudentCours studentCourse = new StudentCours(); studentCourse.studentId = student.StudentId; studentCourse.gameCodingId = gameCoding.Id; studentCourse.moduleId = module.Id; _dbx.StudentCourses.Add(studentCourse); _dbx.SaveChanges(); }
public void SaveStudentTakenCousres(DomainModel.BusinessObject.Student student, DomainModel.BusinessObject.GameCoding gameCoding, DomainModel.BusinessObject.Module module) { studentCourseRepo.AddStudentCourse(student, gameCoding, module); }