public void updateTeaching(string id, teaching tch) { teaching dbtch = database.teachings.First(data => data.idmain == id); dbtch = tch; database.SaveChanges(); }
public void deleteTeaching(string id) { teaching tch = database.teachings.First(data => data.idmain == id); database.teachings.Remove(tch); }
public teaching getTeaching(string id) { teaching tch = database.teachings.First(data => data.idmain == id); return(tch); }
public void insertTeaching(ref teaching tch) { database.teachings.Add(tch); database.SaveChanges(); }