src/Shared/EntityFramework/Internal/EntityEntries/InternalReferenceEntry.cs
// <summary>
// Sets the given value on the given <see cref="IRelatedEnd" /> which must be an
// <see cref="EntityReference{TRelatedEntity}" />.
// This method is setup in such a way that it can easily be used by CreateDelegate without any
// dynamic code generation needed.
// </summary>
// <typeparam name="TRelatedEntity"> The type of the related entity. </typeparam>
// <param name="entityReference"> The entity reference. </param>
// <param name="value"> The value. </param>
Sets the given value on the given  which must be an
.
This method is setup in such a way that it can easily be used by CreateDelegate without any
dynamic code generation needed.
Sets the given value on the given which must be an . This method is setup in such a way that it can easily be used by CreateDelegate without any dynamic code generation needed .
private static void SetValueOnEntityReference<TRelatedEntity>(IRelatedEnd entityReference, object value)
            where TRelatedEntity : class
        {
            Debug.Assert(value == null || value is TRelatedEntity);
            ((EntityReference<TRelatedEntity>)entityReference).Value = (TRelatedEntity)value;
        }
private static void SetValueOnEntityReference < TRelatedEntity > ( IRelatedEnd entityReference , object value ) where TRelatedEntity : class { Debug . Assert ( value == null || value is TRelatedEntity ) ; ( ( EntityReference < TRelatedEntity > ) entityReference ) . Value = ( TRelatedEntity ) value ; }
Sets the given value on the given  which must be an
.
Sets the given value on the given which must be an .
entityReference
IRelatedEnd
The entity reference.
The entity reference .
value
object
None
typeparam
The type of the related entity.
The type of the related entity .