/// <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>
        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);
        }
        /// <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>
        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));
        }