internal static EntityContainerMapping GetEntityContainerMap( StorageMappingItemCollection mappingCollection, EntityContainer entityContainer) { var entityContainerMaps = mappingCollection.GetItems <EntityContainerMapping>(); EntityContainerMapping entityContainerMap = null; foreach (var map in entityContainerMaps) { if ((entityContainer.Equals(map.EdmEntityContainer)) || (entityContainer.Equals(map.StorageEntityContainer))) { entityContainerMap = map; break; } } if (entityContainerMap == null) { throw new MappingException(Strings.Mapping_NotFound_EntityContainer(entityContainer.Name)); } return(entityContainerMap); }
internal static EntityContainerMapping GetEntityContainerMap( StorageMappingItemCollection mappingCollection, EntityContainer entityContainer) { ReadOnlyCollection <EntityContainerMapping> items = mappingCollection.GetItems <EntityContainerMapping>(); EntityContainerMapping containerMapping1 = (EntityContainerMapping)null; foreach (EntityContainerMapping containerMapping2 in items) { if (entityContainer.Equals((object)containerMapping2.EdmEntityContainer) || entityContainer.Equals((object)containerMapping2.StorageEntityContainer)) { containerMapping1 = containerMapping2; break; } } if (containerMapping1 == null) { throw new MappingException(Strings.Mapping_NotFound_EntityContainer((object)entityContainer.Name)); } return(containerMapping1); }
internal static StorageEntityContainerMapping GetEntityContainerMap( StorageMappingItemCollection mappingCollection, EntityContainer entityContainer) { var entityContainerMaps = mappingCollection.GetItems<StorageEntityContainerMapping>(); StorageEntityContainerMapping entityContainerMap = null; foreach (var map in entityContainerMaps) { if ((entityContainer.Equals(map.EdmEntityContainer)) || (entityContainer.Equals(map.StorageEntityContainer))) { entityContainerMap = map; break; } } if (entityContainerMap == null) { throw new MappingException(Strings.Mapping_NotFound_EntityContainer(entityContainer.Name)); } return entityContainerMap; }