Пример #1
0
        BuildAssociationSetMappings(
            EntityContainerMapping entityContainerMapping,
            SimpleMappingContext mappingContext)
        {
            Debug.Assert(entityContainerMapping != null, "entityContainerMapping != null");
            Debug.Assert(mappingContext != null, "mappingContext != null");

            var associationSetMappings = new List <AssociationSetMapping>();

            foreach (var associationSet in mappingContext.StoreAssociationSets())
            {
                var mapping = BuildAssociationSetMapping(associationSet, entityContainerMapping, mappingContext);
                if (mapping != null)
                {
                    associationSetMappings.Add(mapping);
                }
            }

            foreach (var collapsibleItem in mappingContext.CollapsedAssociationSets())
            {
                var mapping = BuildAssociationSetMapping(collapsibleItem, entityContainerMapping, mappingContext);
                if (mapping != null)
                {
                    associationSetMappings.Add(mapping);
                }
            }

            return(associationSetMappings);
        }
            BuildAssociationSetMappings(
            EntityContainerMapping entityContainerMapping,
            SimpleMappingContext mappingContext)
        {
            Debug.Assert(entityContainerMapping != null, "entityContainerMapping != null");
            Debug.Assert(mappingContext != null, "mappingContext != null");

            var associationSetMappings = new List<AssociationSetMapping>();

            foreach (var associationSet in mappingContext.StoreAssociationSets())
            {
                var mapping = BuildAssociationSetMapping(associationSet, entityContainerMapping, mappingContext);
                if (mapping != null)
                {
                    associationSetMappings.Add(mapping);
                }
            }

            foreach (var collapsibleItem in mappingContext.CollapsedAssociationSets())
            {
                var mapping = BuildAssociationSetMapping(collapsibleItem, entityContainerMapping, mappingContext);
                if (mapping != null)
                {
                    associationSetMappings.Add(mapping);
                }
            }

            return associationSetMappings;
        }