src/Misc/EFTools/EntityDesignModel/Entity/EntityType.cs
/// <summary>
///     Normally we will just the general implementation for this.  The exception is when we
///     are trying to bind to this from the TypeName attribute of an EntityTypeMapping.  In this
///     case, we need to return IsTypeOf(typeName) if the ETM needs it that way.
///     Simillary we need to return "Collection(typeName)" string for the ReturnType attribute of a FunctionImport.
/// </summary>
/// <param name="binding"></param>
/// <returns></returns>
Normally we will just the general implementation for this.  The exception is when we
are trying to bind to this from the TypeName attribute of an EntityTypeMapping.  In this
case, we need to return IsTypeOf(typeName) if the ETM needs it that way.
Simillary we need to return "Collection(typeName)" string for the ReturnType attribute of a FunctionImport.
Normally we will just the general implementation for this . The exception is when we are trying to bind to this from the TypeName attribute of an EntityTypeMapping . In this case we need to return IsTypeOf ( typeName ) if the ETM needs it that way . Simillary we need to return " Collection ( typeName ) " string for the ReturnType attribute of a FunctionImport .
internal override string GetRefNameForBinding(ItemBinding binding)
        {
            var etm = binding.Parent as EntityTypeMapping;
            if (etm != null
                && etm.Kind == EntityTypeMappingKind.IsTypeOf)
            {
                return string.Format(
                    CultureInfo.InvariantCulture,
                    EntityTypeMapping.IsTypeOfFormat,
                    NormalizedNameExternal);
            }
            var fi = binding.Parent as FunctionImport;
            if (fi != null)
            {
                return string.Format(
                    CultureInfo.InvariantCulture,
                    FunctionImport.CollectionFormat,
                    NormalizedNameExternal);
            }
            return base.GetRefNameForBinding(binding);
        }
internal override string GetRefNameForBinding ( ItemBinding binding ) { var etm = binding . Parent as EntityTypeMapping ; if ( etm != null && etm . Kind == EntityTypeMappingKind . IsTypeOf ) { return string . Format ( CultureInfo . InvariantCulture , EntityTypeMapping . IsTypeOfFormat , NormalizedNameExternal ) ; } var fi = binding . Parent as FunctionImport ; if ( fi != null ) { return string . Format ( CultureInfo . InvariantCulture , FunctionImport . CollectionFormat , NormalizedNameExternal ) ; } return base . GetRefNameForBinding ( binding ) ; }
Normally we will just the general implementation for this.
Normally we will just the general implementation for this .
None
binding
ItemBinding
None