src/Misc/EFTools/EntityDesignModel/Entity/FunctionImport.cs
/// <summary>
///     This method will go through function-import result-column type mappings.
///     For each type-mapping checks whether there exists a type-mapping that involves the passed-in property.
///     If a match is found, the corresponding column name is returned.
///     If no match could be found, an empty string is returned.
/// </summary>
/// <param name="property"></param>
/// <returns></returns>
This method will go through function-import result-column type mappings.
For each type-mapping checks whether there exists a type-mapping that involves the passed-in property.
If a match is found, the corresponding column name is returned.
If no match could be found, an empty string is returned.
This method will go through function - import result - column type mappings . For each type - mapping checks whether there exists a type - mapping that involves the passed - in property . If a match is found the corresponding column name is returned . If no match could be found an empty string is returned .
internal static string GetFunctionImportResultColumnName(FunctionImport functionImport, Property property)
        {
            if (functionImport == null)
            {
                throw new ArgumentException("functionImport is null.");
            }
            if (property == null)
            {
                throw new ArgumentException("property is null");
            }
            var mapping = functionImport.FunctionImportMapping;
            if (mapping != null
                && mapping.ResultMapping != null)
            {
                foreach (var typeMapping in mapping.ResultMapping.TypeMappings())
                {
                    var scalarProperty = typeMapping.FindScalarProperty(property);
                    if (scalarProperty != null)
                    {
                        Debug.Assert(!String.IsNullOrEmpty(scalarProperty.ColumnName.Value), "Function Import Result Column name is empty");
                        if (!String.IsNullOrEmpty(scalarProperty.ColumnName.Value))
                        {
                            return scalarProperty.ColumnName.Value;
                        }
                    }
                }
            }
            return String.Empty;
        }
internal static string GetFunctionImportResultColumnName ( FunctionImport functionImport , Property property ) { if ( functionImport == null ) { throw new ArgumentException ( " " ) ; } if ( property == null ) { throw new ArgumentException ( " " ) ; } var mapping = functionImport . FunctionImportMapping ; if ( mapping != null && mapping . ResultMapping != null ) { foreach ( var typeMapping in mapping . ResultMapping . TypeMappings ( ) ) { var scalarProperty = typeMapping . FindScalarProperty ( property ) ; if ( scalarProperty != null ) { Debug . Assert ( ! String . IsNullOrEmpty ( scalarProperty . ColumnName . Value ) , " " ) ; if ( ! String . IsNullOrEmpty ( scalarProperty . ColumnName . Value ) ) { return scalarProperty . ColumnName . Value ; } } } } return String . Empty ; }
This method will go through function-import result-column type mappings.
This method will go through function - import result - column type mappings .
None
functionImport
FunctionImport
property
Property
None