Ejemplo n.º 1
0
 public Assessment AddAssessment(Assessment assessment)
 {
     _markPredictorDbContext.Assessment.Add(assessment);
     _markPredictorDbContext.SaveChanges();
     _markPredictorDbContext.Entry(assessment).State = System.Data.Entity.EntityState.Detached;
     return(assessment);
 }
Ejemplo n.º 2
0
        public Module Save()
        {
            Module module = new Module
            {
                ModuleName = ModuleName,
                CourseId   = CourseId,
                LevelId    = LevelId,
                Credit     = Credit
            };

            _markPredictorDbContext.Module.Add(module);
            _markPredictorDbContext.SaveChanges();
            _markPredictorDbContext.Entry(module).State = System.Data.Entity.EntityState.Detached;
            return(module);
        }