public void updateLesson(string id, lesson l) { lesson dbl = database.lessons.First(data => data.idlessons == id); dbl = l; database.SaveChanges(); }
public void deleteLesson(string id) { lesson l = database.lessons.First(data => data.idlessons == id); database.lessons.Remove(l); }
public lesson getLesson(string id) { lesson l = database.lessons.First(data => data.idlessons == id); return(l); }
public void insertLesson(ref lesson l) { database.lessons.Add(l); database.SaveChanges(); }