public override void Visit(ValueTypeMemberMap memberMap) { var oldValue = this.value; this.value = memberMap.MemberGetter(this.entity); base.Visit(memberMap); if(this.value != MongoDBNull.Value || memberMap.PersistNull) this.document[memberMap.Key] = this.value; this.value = oldValue; }
public override void Visit(ValueTypeMemberMap memberMap) { if (memberMap.ValueType is NestedClassValueType) { var vt = (NestedClassValueType)memberMap.ValueType; var oldEntity = currentEntity; var oldClassMap = currentClassMap; currentEntity = memberMap.MemberGetter(this.currentEntity); currentClassMap = vt.NestedClassMap; this.Visit(currentClassMap); this.currentEntity = oldEntity; this.currentClassMap = oldClassMap; } }
public virtual void Visit(ValueTypeMemberMap memberMap) { }