Пример #1
0
        public void updateSubject(string id, subject sub)
        {
            subject dbsub = database.subjects.First(data => data.idsubjects == id);

            dbsub = sub;
            database.SaveChanges();
        }
Пример #2
0
        public void deleteSubject(string id)
        {
            subject sub = database.subjects.First(data => data.idsubjects == id);

            database.subjects.Remove(sub);
        }
Пример #3
0
        public subject getSubject(string id)
        {
            subject sub = database.subjects.First(data => data.idsubjects == id);

            return(sub);
        }
Пример #4
0
 public void insertSubject(ref subject sub)
 {
     database.subjects.Add(sub);
     database.SaveChanges();
 }