src/Shared/EntityFramework/Internal/EntityEntries/DbDataRecordPropertyValues.cs
// <summary>
// Gets the dictionary item for a given property name.
// </summary>
// <param name="propertyName"> Name of the property. </param>
// <returns> An item for the given name. </returns>
Gets the dictionary item for a given property name.
Gets the dictionary item for a given property name .
protected override IPropertyValuesItem GetItemImpl(string propertyName)
        {
            var ordinal = _dataRecord.GetOrdinal(propertyName);
            var value = _dataRecord[ordinal];
            var asDataRecord = value as DbUpdatableDataRecord;
            if (asDataRecord != null)
            {
                value = new DbDataRecordPropertyValues(
                    InternalContext, _dataRecord.GetFieldType(ordinal), asDataRecord, isEntity: false);
            }
            else if (value == DBNull.Value)
            {
                value = null;
            }
            return new DbDataRecordPropertyValuesItem(_dataRecord, ordinal, value);
        }
protected override IPropertyValuesItem GetItemImpl ( string propertyName ) { var ordinal = _dataRecord . GetOrdinal ( propertyName ) ; var value = _dataRecord [ ordinal ] ; var asDataRecord = value as DbUpdatableDataRecord ; if ( asDataRecord != null ) { value = new DbDataRecordPropertyValues ( InternalContext , _dataRecord . GetFieldType ( ordinal ) , asDataRecord , isEntity : false ) ; } else if ( value == DBNull . Value ) { value = null ; } return new DbDataRecordPropertyValuesItem ( _dataRecord , ordinal , value ) ; }
Gets the dictionary item for a given property name.
Gets the dictionary item for a given property name .
An item for the given name.
An item for the given name .
propertyName
string
Name of the property.
Name of the property .