Esempio n. 1
0
        public void updateTeaching(string id, teaching tch)
        {
            teaching dbtch = database.teachings.First(data => data.idmain == id);

            dbtch = tch;
            database.SaveChanges();
        }
Esempio n. 2
0
        public void deleteTeaching(string id)
        {
            teaching tch = database.teachings.First(data => data.idmain == id);

            database.teachings.Remove(tch);
        }
Esempio n. 3
0
        public teaching getTeaching(string id)
        {
            teaching tch = database.teachings.First(data => data.idmain == id);

            return(tch);
        }
Esempio n. 4
0
 public void insertTeaching(ref teaching tch)
 {
     database.teachings.Add(tch);
     database.SaveChanges();
 }