Ejemplo n.º 1
0
 internal override bool ResolveNameAndSetTypeUsage(
     Converter.ConversionCache convertedItemCache,
     Dictionary <SchemaElement, GlobalItem> newGlobalItems)
 {
     if (this._typeUsage == null)
     {
         RefType refType = new RefType((EdmType)Converter.LoadSchemaElement(this._type, this._type.Schema.ProviderManifest, convertedItemCache, newGlobalItems) as System.Data.Entity.Core.Metadata.Edm.EntityType);
         refType.AddMetadataProperties(this.OtherContent);
         this._typeUsage = TypeUsage.Create((EdmType)refType);
     }
     return(true);
 }
Ejemplo n.º 2
0
        internal override bool ResolveNameAndSetTypeUsage(Converter.ConversionCache convertedItemCache, Dictionary <Som.SchemaElement, GlobalItem> newGlobalItems)
        {
            if (_typeUsage == null)
            {
                Debug.Assert(!(_type is ScalarType));

                EdmType    edmType    = (EdmType)Converter.LoadSchemaElement(_type, _type.Schema.ProviderManifest, convertedItemCache, newGlobalItems);
                EntityType entityType = edmType as EntityType;

                Debug.Assert(entityType != null);

                RefType refType = new RefType(entityType);
                refType.AddMetadataProperties(this.OtherContent);
                _typeUsage = TypeUsage.Create(refType);
            }
            return(true);
        }