src/Shared/EntityFramework/Internal/EntityEntries/InternalNestedPropertyEntry.cs
// <summary>
// Creates a delegate that will set the value of this property.
// </summary>
// <returns> The delegate. </returns>
Creates a delegate that will set the value of this property.
Creates a delegate that will set the value of this property .
protected override Action<object, object> CreateSetter()
        {
            var parentGetter = _parentPropertyEntry.Getter;
            if (parentGetter == null)
            {
                return null;
            }
            Action<object, object> setter;
            if (!DbHelpers.GetPropertySetters(EntryMetadata.DeclaringType).TryGetValue(Name, out setter))
            {
                return null;
            }
            return (o, v) =>
                {
                    var parent = parentGetter(o);
                    if (parent == null)
                    {
                        throw Error.DbPropertyValues_CannotSetPropertyOnNullCurrentValue(
                            Name, ParentPropertyEntry.Name);
                    }
                    setter(parentGetter(o), v);
                };
        }
protected override Action < object , object > CreateSetter ( ) { var parentGetter = _parentPropertyEntry . Getter ; if ( parentGetter == null ) { return null ; } Action < object , object > setter ; if ( ! DbHelpers . GetPropertySetters ( EntryMetadata . DeclaringType ) . TryGetValue ( Name , out setter ) ) { return null ; } return ( o , v ) => { var parent = parentGetter ( o ) ; if ( parent == null ) { throw Error . DbPropertyValues_CannotSetPropertyOnNullCurrentValue ( Name , ParentPropertyEntry . Name ) ; } setter ( parentGetter ( o ) , v ) ; } ; }
Creates a delegate that will set the value of this property.
Creates a delegate that will set the value of this property .
None