Beispiel #1
0
 public virtual void SaveRelation(Relation relation)
 {
     Db.Entry (relation).State = EntityState.Modified;
     Db.SaveChanges ();
 }
Beispiel #2
0
        /// <summary>
        ///     Adds a new relation to the person.
        /// </summary>
        /// <param name="p">Person</param>
        /// <param name="division">Stb division.</param>
        /// <param name="comment">Comment</param>
        private void AddStbRelationToPerson(Person p, StbDivision division, string comment, RelationType type)
        {
            Relation r = new Relation ();
            r.SubjectiveEntity = division;
            r.RelationType = type;
            r.ObjectiveEntity = p;
            r.Note = comment;

            _ctx.Relations.Add (r);
        }