public RelationshipsTeacherSubject Update(RelationshipsTeacherSubject relationships)
        {
            var r = _db.RelationshipsTeacherSubject.Where(r => r.ID == relationships.ID).SingleOrDefault();

            if (r == null)
            {
                return(null);
            }

            r.SubjectID = relationships.SubjectID;
            r.TeacherID = relationships.TeacherID;

            _db.SaveChanges();

            return(r);
        }
 public int Insert(RelationshipsTeacherSubject relationships)
 {
     _db.RelationshipsTeacherSubject.Add(relationships);
     return(_db.SaveChanges());
 }