Esempio n. 1
0
        private DbExpression GeneratePropertyMappingView(StoragePropertyMapping mapping, DbExpression row, List <string> context, IList <EdmSchemaError> errors)
        {
            Debug.Assert(mapping is StorageScalarPropertyMapping, "Complex property mapping is not supported in function imports.");
            var scalarPropertyMapping = (StorageScalarPropertyMapping)mapping;

            return(GenerateScalarPropertyMappingView(scalarPropertyMapping.EdmProperty, scalarPropertyMapping.ColumnProperty, row));
        }
Esempio n. 2
0
        protected virtual void Visit(StoragePropertyMapping storagePropertyMapping)
        {
            // this is a switching node, so no object header and footer will be add for this node,
            // also this Visit won't add the object to the seen list

            if (storagePropertyMapping.GetType() == typeof(StorageComplexPropertyMapping))
            {
                Visit((StorageComplexPropertyMapping)storagePropertyMapping);
            }
            else if (storagePropertyMapping.GetType() == typeof(StorageConditionPropertyMapping))
            {
                Visit((StorageConditionPropertyMapping)storagePropertyMapping);
            }
            else if (storagePropertyMapping.GetType() == typeof(StorageScalarPropertyMapping))
            {
                Visit((StorageScalarPropertyMapping)storagePropertyMapping);
            }
            else
            {
                Debug.Fail(String.Format(CultureInfo.InvariantCulture, "Found type '{0}', did we add a new type?", storagePropertyMapping.GetType()));
            }
        }
 /// <summary>
 /// Add a property mapping as a child of End property mapping
 /// </summary>
 /// <param name="prop"></param>
 internal void AddProperty(StoragePropertyMapping prop) {
     this.m_properties.Add(prop);
 }
 /// <summary>
 /// Add a property mapping as a child of this complex property mapping
 /// </summary>
 /// <param name="prop">The mapping that needs to be added</param>
 internal void AddProperty(StoragePropertyMapping prop)
 {
     m_properties.Add(prop.EdmProperty.Name, prop);
 }
Esempio n. 5
0
 /// <summary>
 /// Add a property mapping as a child of this mapping fragment
 /// </summary>
 /// <param name="prop">child property mapping to be added</param>
 internal void AddProperty(StoragePropertyMapping prop)
 {
     this.m_properties.Add(prop);
 }
 /// <summary>
 /// Add a property mapping as a child of this complex property mapping
 /// </summary>
 /// <param name="prop">The mapping that needs to be added</param>
 internal void AddProperty(StoragePropertyMapping prop)
 {
     m_properties.Add(prop.EdmProperty.Name, prop);
 }
 protected override void Visit(StoragePropertyMapping storagePropertyMapping)
 {
     base.Visit(storagePropertyMapping);
 }
 private DbExpression GeneratePropertyMappingView(StoragePropertyMapping mapping, DbExpression row, List<string> context, IList<EdmSchemaError> errors)
 {
     Debug.Assert(mapping is StorageScalarPropertyMapping, "Complex property mapping is not supported in function imports.");
     var scalarPropertyMapping = (StorageScalarPropertyMapping)mapping;
     return GenerateScalarPropertyMappingView(scalarPropertyMapping.EdmProperty, scalarPropertyMapping.ColumnProperty, row);
 }
        protected virtual void Visit(StoragePropertyMapping storagePropertyMapping)
        {
            // this is a switching node, so no object header and footer will be add for this node,
            // also this Visit won't add the object to the seen list

            if (storagePropertyMapping.GetType() == typeof(StorageComplexPropertyMapping))
            {
                Visit((StorageComplexPropertyMapping)storagePropertyMapping);
            }
            else if (storagePropertyMapping.GetType() == typeof(StorageConditionPropertyMapping))
            {
                Visit((StorageConditionPropertyMapping)storagePropertyMapping);
            }
            else if (storagePropertyMapping.GetType() == typeof(StorageScalarPropertyMapping))
            {
                Visit((StorageScalarPropertyMapping)storagePropertyMapping);
            }
            else
            {
                Debug.Fail(String.Format(CultureInfo.InvariantCulture, "Found type '{0}', did we add a new type?", storagePropertyMapping.GetType()));
            }
        }
Esempio n. 10
0
 protected override void Visit(StoragePropertyMapping storagePropertyMapping)
 {
     base.Visit(storagePropertyMapping);
 }
 private static DbExpression GeneratePropertyMappingView(StoragePropertyMapping mapping, DbExpression row)
 {
     Debug.Assert(mapping is StorageScalarPropertyMapping, "Complex property mapping is not supported in function imports.");
     var scalarPropertyMapping = (StorageScalarPropertyMapping)mapping;
     return GenerateScalarPropertyMappingView(scalarPropertyMapping.EdmProperty, scalarPropertyMapping.ColumnProperty, row);
 }