Пример #1
0
 private static void SetCUDFunctionParametersMapping(TypeBase entityType, XElement functionMappingElement, EntityTypeCUDFunctionParametersMapping cudFunctionParametersMapping, ICSharpCode.Data.EDMDesigner.Core.EDMObjects.SSDL.Function.Function ssdlFunction)
 {
     SetCUDFunctionParametersScalarMapping(entityType, functionMappingElement, cudFunctionParametersMapping, ssdlFunction);
     foreach (var complexPropertyElement in functionMappingElement.Elements(XName.Get("ComplexProperty", mslNamespace.NamespaceName)))
     {
         var cudFunctionComplexPropertyParametersMapping = new EntityTypeCUDFunctionParametersMapping();
         var complexProperty = entityType.AllComplexProperties.GetByName(complexPropertyElement.Attribute("Name").Value);
         cudFunctionParametersMapping.ComplexPropertiesMapping.Add(new KeyValuePair <ComplexProperty, EntityTypeCUDFunctionParametersMapping>(complexProperty, cudFunctionComplexPropertyParametersMapping));
         SetCUDFunctionParametersMapping(complexProperty.ComplexType, complexPropertyElement, cudFunctionComplexPropertyParametersMapping, ssdlFunction);
     }
 }
Пример #2
0
        private static IEnumerable <XElement> CUDFunctionMappingParameters(EntityTypeCUDFunctionParametersMapping cudFunctionParameters)
        {
            List <XElement> complexProperties = new List <XElement>();

            foreach (var complexParameter in cudFunctionParameters.ComplexPropertiesMapping)
            {
                XElement complexProperty = new XElement(mslNamespace + "Complexproperty",
                                                        new XAttribute("Name", complexParameter.Key.Name));
                complexProperty.Add(CUDFunctionMappingParameters(complexParameter.Value));
            }

            return(CUDFunctionMappingScalarPropertiesParameters(cudFunctionParameters).Union(complexProperties));
        }