예제 #1
0
        //The update gets a reference to the parent object as well....
        public Modification <TContainer, TElement> Add <TField>(Expression <Func <TElement, TField> > fieldSelector,
                                                                Action <TField, TElement> entityUpdateReferencingParent) where TField : class, IEntity, new()
        {
            var upd = new EntityAddition <TElement, TField>(fieldSelector, entityUpdateReferencingParent);

            this.EntityFieldModifications.Add(upd);
            return(this);
        }
예제 #2
0
        //Add an entity as a field. Does not update any value inside it.
        public Modification <TContainer, TElement> Add <TField>(Expression <Func <TElement, TField> > fieldSelector)
            where TField : class, IEntity, new()
        {
            var upd = new EntityAddition <TElement, TField>(fieldSelector, x => { });

            this.EntityFieldModifications.Add(upd);
            return(this);
        }