public void Update(Lesson updatedLesson)
 {
     Lesson less = _db.Lessons.Find(updatedLesson.id);
     less.name = updatedLesson.name;
     less.Time = updatedLesson.Time;
     _db.SaveChanges();
 }
 public void Create(Lesson less)
 {
     _db.Lessons.Add(less);
     _db.SaveChanges();
 }
Пример #3
0
 public LessonGrid(Lesson less)
 {
     this.Id = less.id;
     this.Name = less.name;
 }