Esempio n. 1
0
        public void Delete(int id)
        {
            DataLesson Lesson = db.Lessons.Find(id);

            db.Lessons.Remove(Lesson);
            db.SaveChanges();
        }
Esempio n. 2
0
        public void Update(RepoLesson item)
        {
            DataLesson st = db.Lessons.Find(item.Id);

            st.Name            = item.Name;
            db.Entry(st).State = EntityState.Modified;
            db.SaveChanges();
        }
Esempio n. 3
0
 public static RepoLesson FromDataLessonToRepoLesson(this DataLesson item)
 {
     return(new RepoLesson
     {
         Id = item.Id,
         Name = item.Name,
         StudentNumber = item.StudentNumber
     });
 }
Esempio n. 4
0
 public void LoadDynamicData()
 {
     this.stuff             = DataStuff.GetStuff();
     this.location          = DataLocations.GetLocations();
     this.actor             = DataActors.GetActors();
     this.lessons.Lesson    = DataLesson.GetLessons();
     this.skills.Skill      = DataSkill.GetSkills();
     this.variables         = new Dictionary <String, dynamic>();
     this.variables_timeout = new Dictionary <String, DateTime>();
     this.player            = DataPlayer.CreatePlayer(this.stuff, lessons, skills);
     this.time = new GameTime()
     {
         time = new DateTime(2011, 9, 1, 7, 0, 0)
     };
     Actor.CurrentTime = time;
 }