212 references to RelationshipMultiplicity
System.Data.Entity (153)
System\Data\Common\CommandTrees\ExpressionBuilder\Internal\ArgumentValidation.cs (1)
2036if (RelationshipMultiplicity.Many == end.RelationshipMultiplicity)
System\Data\Common\CommandTrees\Internal\ExpressionDumper.cs (1)
293"RelationshipMultiplicity", Enum.GetName(typeof(RelationshipMultiplicity), end.RelationshipMultiplicity)
System\Data\Common\CommandTrees\ValueExpressions.cs (2)
586if (targetEnd.RelationshipMultiplicity != RelationshipMultiplicity.One && 587targetEnd.RelationshipMultiplicity != RelationshipMultiplicity.ZeroOrOne)
System\Data\Common\EntitySql\SemanticAnalyzer.cs (4)
1594if (toEnd.RelationshipMultiplicity != RelationshipMultiplicity.One && toEnd.RelationshipMultiplicity != RelationshipMultiplicity.ZeroOrOne) 1608(e.RelationshipMultiplicity == RelationshipMultiplicity.One || 1609e.RelationshipMultiplicity == RelationshipMultiplicity.ZeroOrOne)).ToArray();
System\Data\Common\Internal\Materialization\Shaper.cs (5)
288Debug.Assert(targetMember.RelationshipMultiplicity == RelationshipMultiplicity.One || targetMember.RelationshipMultiplicity == RelationshipMultiplicity.ZeroOrOne); 324case RelationshipMultiplicity.ZeroOrOne: 325case RelationshipMultiplicity.One: 346case RelationshipMultiplicity.Many:
System\Data\Common\Utils\MetadataHelper.cs (7)
554endMember.RelationshipMultiplicity == RelationshipMultiplicity.Many) // some other end has multiplicity 0..* 719internal static int GetLowerBoundOfMultiplicity(RelationshipMultiplicity multiplicity) 721if (multiplicity == RelationshipMultiplicity.Many || 722multiplicity == RelationshipMultiplicity.ZeroOrOne) 732internal static int? GetUpperBoundOfMultiplicity(RelationshipMultiplicity multiplicity) 734if (multiplicity == RelationshipMultiplicity.One || 735multiplicity == RelationshipMultiplicity.ZeroOrOne)
System\Data\EntityModel\SchemaObjectModel\IRelationshipEnd.cs (1)
33System.Data.Metadata.Edm.RelationshipMultiplicity? Multiplicity { get; set; }
System\Data\EntityModel\SchemaObjectModel\ReferentialConstraint.cs (12)
94RelationshipMultiplicity expectedPrincipalMultiplicity = (v1Behavior 97? RelationshipMultiplicity.ZeroOrOne 98: RelationshipMultiplicity.One; 99RelationshipMultiplicity expectedDependentMultiplicity = (v1Behavior 102? RelationshipMultiplicity.ZeroOrOne 103: RelationshipMultiplicity.Many; 111if (principalRoleEnd.Multiplicity == RelationshipMultiplicity.Many) 118&& principalRoleEnd.Multiplicity == RelationshipMultiplicity.One) 129&& principalRoleEnd.Multiplicity != RelationshipMultiplicity.One) 148if (dependentRoleEnd.Multiplicity == RelationshipMultiplicity.One && Schema.DataModel == SchemaDataModelOption.ProviderDataModel) 172if (dependentRoleEnd.Multiplicity == RelationshipMultiplicity.Many) 181else if (dependentRoleEnd.Multiplicity != RelationshipMultiplicity.Many)
System\Data\EntityModel\SchemaObjectModel\RelationshipEnd.cs (9)
23private RelationshipMultiplicity? _multiplicity; 54public RelationshipMultiplicity? Multiplicity 108if (Multiplicity == RelationshipMultiplicity.Many && Operations.Count != 0) 213RelationshipMultiplicity multiplicity; 269private static bool TryParseMultiplicity(string value, out RelationshipMultiplicity multiplicity) 274multiplicity = RelationshipMultiplicity.ZeroOrOne; 277multiplicity = RelationshipMultiplicity.One; 280multiplicity = RelationshipMultiplicity.Many; 283multiplicity = (RelationshipMultiplicity)(- 1);
System\Data\Mapping\StorageMappingItemCollection.ViewDictionary.cs (1)
305if (rc.FromRole.RelationshipMultiplicity == RelationshipMultiplicity.ZeroOrOne)
System\Data\Mapping\StorageMappingItemLoader.cs (2)
4056if (toEnd.CorrespondingAssociationEndMember.RelationshipMultiplicity != RelationshipMultiplicity.One && 4057toEnd.CorrespondingAssociationEndMember.RelationshipMultiplicity != RelationshipMultiplicity.ZeroOrOne)
System\Data\Mapping\Update\Internal\FunctionMappingTranslator.cs (1)
245if (endMember.RelationshipMultiplicity == RelationshipMultiplicity.One)
System\Data\Mapping\ViewGeneration\QueryRewriting\FragmentQueryKB.cs (4)
114if (constraint.FromRole.RelationshipMultiplicity.Equals(RelationshipMultiplicity.One)) 117Debug.Assert(constraint.ToRole.RelationshipMultiplicity.Equals(RelationshipMultiplicity.Many) == false); 144Debug.Assert(constraint.FromRole.RelationshipMultiplicity.Equals(RelationshipMultiplicity.One)); 145Debug.Assert(constraint.ToRole.RelationshipMultiplicity.Equals(RelationshipMultiplicity.One));
System\Data\Mapping\ViewGeneration\Structures\CellQuery.cs (1)
341foreach (var association in associations.Where(association => association.AssociationSetEnds.Any(end => ( end.CorrespondingAssociationEndMember.RelationshipMultiplicity == RelationshipMultiplicity.One &&
System\Data\Mapping\ViewGeneration\Structures\LeafCellTreeNode.cs (1)
212if (foreignKeyEndMap == null || foreignKeyEndMap.EndMember.RelationshipMultiplicity == RelationshipMultiplicity.Many)
System\Data\Mapping\ViewGeneration\Validation\ForeignConstraint.cs (2)
461if (parentEnd.RelationshipMultiplicity == RelationshipMultiplicity.Many) 472if (MemberPath.AreAllMembersNullable(ChildColumns) == false && parentEnd.RelationshipMultiplicity != RelationshipMultiplicity.One)
System\Data\Mapping\ViewGeneration\ViewgenContext.cs (1)
141oneToOneForeignKeyAssociationsForThisWrapper = oneToOneForeignKeyAssociationsForThisWrapper.Where(it => (it.AssociationEndMembers.All(endMember => endMember.RelationshipMultiplicity == RelationshipMultiplicity.One)));
System\Data\Metadata\Converter.cs (3)
803if (somRelationshipEnd.Multiplicity == RelationshipMultiplicity.Many) 809Debug.Assert(somRelationshipEnd.Multiplicity != RelationshipMultiplicity.Many); 814if (somRelationshipEnd.Multiplicity == RelationshipMultiplicity.One)
System\Data\Metadata\Edm\AssociationEndMember.cs (1)
32RelationshipMultiplicity multiplicity)
System\Data\Metadata\Edm\LightweightCodeGenerator.cs (4)
493case RelationshipMultiplicity.ZeroOrOne: 494case RelationshipMultiplicity.One: 507case RelationshipMultiplicity.Many: 521throw EntityUtil.InvalidEnumerationValue(typeof(RelationshipMultiplicity), (int)targetMember.RelationshipMultiplicity);
System\Data\Metadata\Edm\RelationshipEndMember.cs (3)
32RelationshipMultiplicity multiplicity) 43private RelationshipMultiplicity _relationshipMultiplicity; 69public RelationshipMultiplicity RelationshipMultiplicity
System\Data\Metadata\Helper.cs (5)
158it.RelationshipMultiplicity.Equals(RelationshipMultiplicity.One))) 162((it.RelationshipMultiplicity.Equals(RelationshipMultiplicity.Many)) 163|| (it.RelationshipMultiplicity.Equals(RelationshipMultiplicity.ZeroOrOne)))); 168(it.RelationshipMultiplicity.Equals(RelationshipMultiplicity.ZeroOrOne)))) 172((it.RelationshipMultiplicity.Equals(RelationshipMultiplicity.Many))));
System\Data\Metadata\ObjectLayer\ObjectItemAttributeAssemblyLoader.cs (3)
238RelationshipMultiplicity r1Multiplicity = roleAttribute.Role1Multiplicity; 245RelationshipMultiplicity r2Multiplicity = roleAttribute.Role2Multiplicity; 256private void ResolveAssociationEnd(AssociationType associationType, string roleName, Type clrType, RelationshipMultiplicity multiplicity)
System\Data\Metadata\ObjectLayer\ObjectItemConventionAssemblyLoader.cs (1)
426bool needsSetter = cspaceProperty.ToEndMember.RelationshipMultiplicity != RelationshipMultiplicity.Many;
System\Data\Objects\DataClasses\EdmRelationshipRoleAttribute.cs (8)
23private readonly RelationshipMultiplicity _role1Multiplicity; 24private readonly RelationshipMultiplicity _role2Multiplicity; 38RelationshipMultiplicity role1Multiplicity, 41RelationshipMultiplicity role2Multiplicity, 65RelationshipMultiplicity role1Multiplicity, 68RelationshipMultiplicity role2Multiplicity, 113public RelationshipMultiplicity Role1Multiplicity 136public RelationshipMultiplicity Role2Multiplicity
System\Data\Objects\DataClasses\EntityReference_TResultType.cs (3)
185if (!((AssociationType)base.RelationMetadata).IsForeignKey && ToEndMember.RelationshipMultiplicity == RelationshipMultiplicity.One) 300if (FromEndProperty.RelationshipMultiplicity != RelationshipMultiplicity.Many) 329if (FromEndProperty.RelationshipMultiplicity != RelationshipMultiplicity.Many && !relatedEnd.IsEmpty())
System\Data\Objects\DataClasses\RelatedEnd.cs (3)
1801((ToEndMember.RelationshipMultiplicity == RelationshipMultiplicity.ZeroOrOne || 1802ToEndMember.RelationshipMultiplicity == RelationshipMultiplicity.One) && 1998_fromEndProperty.RelationshipMultiplicity == RelationshipMultiplicity.Many;
System\Data\Objects\DataClasses\RelationshipFixer.cs (4)
22RelationshipMultiplicity _sourceRoleMultiplicity; 23RelationshipMultiplicity _targetRoleMultiplicity; 25internal RelationshipFixer(RelationshipMultiplicity sourceRoleMultiplicity, RelationshipMultiplicity targetRoleMultiplicity)
System\Data\Objects\DataClasses\RelationshipManager.cs (11)
205RelationshipMultiplicity sourceRoleMultiplicity, RelatedEnd existingRelatedEnd) 228return CreateRelatedEnd<TSourceEntity, TTargetEntity>(navigation, sourceRoleMultiplicity, RelationshipMultiplicity.Many, existingRelatedEnd) as EntityCollection<TTargetEntity>; 244collection = CreateRelatedEnd<TSourceEntity, TTargetEntity>(navigation, sourceRoleMultiplicity, RelationshipMultiplicity.Many, existingRelatedEnd) as EntityCollection<TTargetEntity>; 341RelationshipMultiplicity sourceRoleMultiplicity, RelatedEnd existingRelatedEnd) 361return CreateRelatedEnd<TSourceEntity, TTargetEntity>(navigation, sourceRoleMultiplicity, RelationshipMultiplicity.One, existingRelatedEnd) as EntityReference<TTargetEntity>; 930internal RelatedEnd CreateRelatedEnd<TSourceEntity, TTargetEntity>(RelationshipNavigation navigation, RelationshipMultiplicity sourceRoleMultiplicity, RelationshipMultiplicity targetRoleMultiplicity, RelatedEnd existingRelatedEnd) 939case RelationshipMultiplicity.ZeroOrOne: 940case RelationshipMultiplicity.One: 952case RelationshipMultiplicity.Many: 965throw EntityUtil.InvalidEnumerationValue(typeof(RelationshipMultiplicity), (int)targetRoleMultiplicity);
System\Data\Objects\EntityEntry.cs (7)
2142if (n.ToEndMember.RelationshipMultiplicity == RelationshipMultiplicity.Many) 2265if (n.ToEndMember.RelationshipMultiplicity == RelationshipMultiplicity.Many) 2552RelationshipMultiplicity multiplicity = this.GetAssociationEndMember(relationshipEntry).RelationshipMultiplicity; 2553if (multiplicity == RelationshipMultiplicity.One || 2554multiplicity == RelationshipMultiplicity.ZeroOrOne) 2607RelationshipMultiplicity multiplicity = this.GetAssociationEndMember(relationshipEntry).RelationshipMultiplicity; 2608if (multiplicity == RelationshipMultiplicity.Many)
System\Data\Objects\Internal\EntityProxyFactory.cs (3)
1102RelationshipMultiplicity multiplicity = navProperty.ToEndMember.RelationshipMultiplicity; 1104if (multiplicity == RelationshipMultiplicity.Many) 1210if (navProperty.ToEndMember.RelationshipMultiplicity == RelationshipMultiplicity.Many)
System\Data\Objects\Internal\LazyLoadBehavior.cs (6)
62RelationshipMultiplicity multiplicity = navProperty.ToEndMember.RelationshipMultiplicity; 75if (multiplicity == RelationshipMultiplicity.Many) 124RelationshipMultiplicity multiplicity = navProperty.ToEndMember.RelationshipMultiplicity; 130if (multiplicity == RelationshipMultiplicity.Many) 135else if (multiplicity == RelationshipMultiplicity.One || multiplicity == RelationshipMultiplicity.ZeroOrOne)
System\Data\Objects\Internal\ObjectSpanRewriter.cs (2)
697(RelationshipMultiplicity.One == toEnd.RelationshipMultiplicity || 698RelationshipMultiplicity.ZeroOrOne == toEnd.RelationshipMultiplicity))
System\Data\Objects\ObjectStateManager.cs (10)
815if (targetMember.RelationshipMultiplicity != RelationshipMultiplicity.Many) 929if ((endMember.RelationshipMultiplicity == RelationshipMultiplicity.One || 930endMember.RelationshipMultiplicity == RelationshipMultiplicity.ZeroOrOne)) 1022case RelationshipMultiplicity.ZeroOrOne: 1023case RelationshipMultiplicity.One: 1033case RelationshipMultiplicity.Many: 1089if (endMember != null && endMember.RelationshipMultiplicity == RelationshipMultiplicity.Many) 1211case RelationshipMultiplicity.One: 1212case RelationshipMultiplicity.ZeroOrOne: 1263case RelationshipMultiplicity.Many:
System\Data\Query\InternalTrees\Command.cs (1)
1814if (relProperty.ToEnd.RelationshipMultiplicity != RelationshipMultiplicity.Many &&
System\Data\Query\InternalTrees\RelPropertyHelper.cs (1)
126if (toEnd.RelationshipMultiplicity == RelationshipMultiplicity.Many)
System\Data\Query\PlanCompiler\ConstraintManager.cs (3)
113internal md.RelationshipMultiplicity ChildMultiplicity { get { return m_constraint.ToRole.RelationshipMultiplicity; } } 157PlanCompiler.Assert((md.RelationshipMultiplicity.ZeroOrOne == fromEnd.RelationshipMultiplicity || md.RelationshipMultiplicity.One == fromEnd.RelationshipMultiplicity), "from-end of relationship constraint cannot have multiplicity greater than 1");
System\Data\Query\PlanCompiler\JoinGraph.cs (2)
2003if (joinEdge.JoinKind == JoinKind.LeftOuter && fkConstraint.ChildMultiplicity == md.RelationshipMultiplicity.Many) 2041return TryEliminateRightTable(joinEdge, fkConstraint.ChildKeys.Count, fkConstraint.ChildMultiplicity == md.RelationshipMultiplicity.One);
System\Data\Query\PlanCompiler\PreProcessor.cs (14)
481(navigateOp.ToEnd.RelationshipMultiplicity == RelationshipMultiplicity.ZeroOrOne || 482navigateOp.ToEnd.RelationshipMultiplicity == RelationshipMultiplicity.One)) 503if (navigateOp.ToEnd.RelationshipMultiplicity != RelationshipMultiplicity.Many) 549if (navigateOp.ToEnd.RelationshipMultiplicity == RelationshipMultiplicity.Many) 839PlanCompiler.Assert(relProperty.FromEnd.RelationshipMultiplicity != RelationshipMultiplicity.Many, 909PlanCompiler.Assert(relProperty.ToEnd.RelationshipMultiplicity == RelationshipMultiplicity.Many && 910relProperty.FromEnd.RelationshipMultiplicity == RelationshipMultiplicity.Many, 976PlanCompiler.Assert(m_command.IsRelPropertyReferenced(relProperty) || (relProperty.ToEnd.RelationshipMultiplicity == RelationshipMultiplicity.Many), 980if ((relProperty.FromEnd.RelationshipMultiplicity == RelationshipMultiplicity.Many) && 981(relProperty.ToEnd.RelationshipMultiplicity != RelationshipMultiplicity.Many)) 994if (relProperty.ToEnd.RelationshipMultiplicity == RelationshipMultiplicity.Many) 1007if (relProperty.ToEnd.RelationshipMultiplicity == RelationshipMultiplicity.Many) 1010if (relProperty.FromEnd.RelationshipMultiplicity == RelationshipMultiplicity.Many) 1255if (navProperty.ToEndMember.RelationshipMultiplicity == RelationshipMultiplicity.Many)
System.Data.Entity.Design (33)
System\Data\Entity\Design\Common\MetadataItemSerializer.cs (4)
338private string GetXmlMultiplicity(RelationshipMultiplicity relationshipMultiplicity) 342case RelationshipMultiplicity.Many: 344case RelationshipMultiplicity.One: 346case RelationshipMultiplicity.ZeroOrOne:
System\Data\Entity\Design\Common\OneToOneMappingSerializer.cs (4)
75public void GetStoreAssociationSetEnd(int index, out AssociationSetEnd storeAssociationSetEnd, out RelationshipMultiplicity multiplicity, out OperationAction deleteBehavior) 82private void GetFromAssociationSetEnd(AssociationSet definingSet, AssociationSet multiplicitySet, out AssociationSetEnd associationSetEnd, out RelationshipMultiplicity multiplicity, out OperationAction deleteBehavior) 123if (multiplicity != RelationshipMultiplicity.Many) 359RelationshipMultiplicity multiplicity;
System\Data\Entity\Design\EntityModelSchemaGenerator.cs (12)
851RelationshipMultiplicity multiplicity; 919KeyValuePair<string, RelationshipMultiplicity> endMultiplicityOverride = CreateEndMultiplicityOverride(session, storeAssociationType, association); 939private KeyValuePair<string, RelationshipMultiplicity> CreateEndMultiplicityOverride(LoadMethodSessionState session, AssociationType storeAssociation, AssociationType modelAssociation) 944return new KeyValuePair<string, RelationshipMultiplicity>(); 962if (storeConstraint.FromRole.RelationshipMultiplicity == RelationshipMultiplicity.ZeroOrOne && 963storeConstraint.ToRole.RelationshipMultiplicity == RelationshipMultiplicity.Many && 966return new KeyValuePair<string, RelationshipMultiplicity>(storeConstraint.FromRole.Name, RelationshipMultiplicity.One); 969return new KeyValuePair<string, RelationshipMultiplicity>(); 1074private AssociationEndMember CreateAssociationEndMember(LoadMethodSessionState session, AssociationEndMember storeEndMember, KeyValuePair<string, RelationshipMultiplicity> endMultiplicityOverride, UniqueIdentifierService usedEndMemberNames) 1076RelationshipMultiplicity multiplicity = storeEndMember.RelationshipMultiplicity; 1084private AssociationEndMember CreateAssociationEndMember(LoadMethodSessionState session, AssociationEndMember storeEndMember, UniqueIdentifierService usedEndMemberNames, RelationshipMultiplicity multiplicityOverride, OperationAction deleteBehaviorOverride)
System\Data\Entity\Design\EntityStoreSchemaGenerator.cs (7)
787RelationshipMultiplicity pkMultiplicity = someFkColmnsAreNullable ? RelationshipMultiplicity.ZeroOrOne : RelationshipMultiplicity.One; 801RelationshipMultiplicity fkMultiplicity = RelationshipMultiplicity.Many; 808fkMultiplicity = RelationshipMultiplicity.ZeroOrOne; 984RelationshipMultiplicity multiplicity,
System\Data\Entity\Design\PluralizationService\EntityDesignPluralizationHandler.cs (1)
58return toEnd.RelationshipMultiplicity == RelationshipMultiplicity.Many ?
System\Data\EntityModel\Emitters\AssociationTypeEmitter.cs (1)
60private CodeExpression GetMultiplicityCodeExpression(RelationshipMultiplicity multiplicity)
System\Data\EntityModel\Emitters\NavigationPropertyEmitter.cs (4)
60if (Item.ToEndMember.RelationshipMultiplicity != RelationshipMultiplicity.Many) 143if (target.RelationshipMultiplicity != RelationshipMultiplicity.Many) 319else if (target.RelationshipMultiplicity == RelationshipMultiplicity.Many) 347if (target.RelationshipMultiplicity != RelationshipMultiplicity.Many)
System.Data.Services (6)
System\Data\Services\Providers\ObjectContextServiceProvider.cs (6)
1689private static string GetMultiplicity(RelationshipMultiplicity multiplicity) 1692if (RelationshipMultiplicity.Many == multiplicity) 1696else if (RelationshipMultiplicity.One == multiplicity) 1703RelationshipMultiplicity.ZeroOrOne == multiplicity, 2072if (association.RelationshipEndMembers[0].RelationshipMultiplicity == RelationshipMultiplicity.Many || 2073association.RelationshipEndMembers[1].RelationshipMultiplicity == RelationshipMultiplicity.Many)
System.Data.Services.Design (3)
System\Data\EntityModel\Emitters\NavigationPropertyEmitter.cs (3)
54EmitField(typeDecl, GetReturnType(Item.ToEndMember), Item.ToEndMember.RelationshipMultiplicity == RelationshipMultiplicity.Many); 138if (target.RelationshipMultiplicity != RelationshipMultiplicity.Many) 317if (target.RelationshipMultiplicity == RelationshipMultiplicity.Many)
System.Web.DynamicData (9)
DynamicData\ModelProviders\EFAssociationProvider.cs (9)
35if (navigationProperty.ToEndMember.RelationshipMultiplicity == RelationshipMultiplicity.Many) { 36if (navigationProperty.FromEndMember.RelationshipMultiplicity == RelationshipMultiplicity.Many) { 44if (navigationProperty.FromEndMember.RelationshipMultiplicity == RelationshipMultiplicity.Many) { 82return (navigationProperty.ToEndMember.RelationshipMultiplicity == RelationshipMultiplicity.ZeroOrOne && 83navigationProperty.FromEndMember.RelationshipMultiplicity == RelationshipMultiplicity.One) || 84(navigationProperty.ToEndMember.RelationshipMultiplicity == RelationshipMultiplicity.One && 85navigationProperty.FromEndMember.RelationshipMultiplicity == RelationshipMultiplicity.ZeroOrOne); 104if (navigationProperty.ToEndMember.RelationshipMultiplicity == RelationshipMultiplicity.ZeroOrOne && 105navigationProperty.FromEndMember.RelationshipMultiplicity == RelationshipMultiplicity.One) {
System.Web.Entity (7)
System\Data\WebControls\EntityDataSourceColumn.cs (2)
207if (this.group.End.CorrespondingAssociationEndMember.RelationshipMultiplicity == RelationshipMultiplicity.ZeroOrOne) 365get { return navigationProperty.ToEndMember.RelationshipMultiplicity == RelationshipMultiplicity.ZeroOrOne; }
System\Data\WebControls\EntityDataSourceUtil.cs (5)
834RelationshipMultiplicity fromMult = fromEnd.CorrespondingAssociationEndMember.RelationshipMultiplicity; 835RelationshipMultiplicity toMult = toEnd.CorrespondingAssociationEndMember.RelationshipMultiplicity; 841if (toMult == RelationshipMultiplicity.One || 842(toMult == RelationshipMultiplicity.ZeroOrOne && (!forKey || fromMult != RelationshipMultiplicity.One) ))
System.Web.Entity.Design (1)
System\Data\WebControls\Design\EntityDataSourceDataSelection.cs (1)
617if (navProp.ToEndMember.RelationshipMultiplicity != RelationshipMultiplicity.Many)