System\Data\Common\CommandTrees\Internal\ExpressionCopier.cs (8)
146prop => new KeyValuePair<string, TypeUsage>(prop.Name, prop.TypeUsage)
149mappedPropInfo[idx] = new KeyValuePair<string,TypeUsage>(originalProp.Name, mappedPropType);
226if(!TryGetMember(newInstance, expression.Property.Name, out endMember))
228throw EntityUtil.Argument(System.Data.Entity.Strings.Cqt_Copier_EndNotFound(expression.Property.Name, TypeHelpers.GetFullName(newInstance.ResultType.EdmType)));
235if (!TryGetMember(newInstance, expression.Property.Name, out navProp))
237throw EntityUtil.Argument(System.Data.Entity.Strings.Cqt_Copier_NavPropertyNotFound(expression.Property.Name, TypeHelpers.GetFullName(newInstance.ResultType.EdmType)));
244if (!TryGetMember(newInstance, expression.Property.Name, out prop))
246throw EntityUtil.Argument(System.Data.Entity.Strings.Cqt_Copier_PropertyNotFound(expression.Property.Name, TypeHelpers.GetFullName(newInstance.ResultType.EdmType)));
System\Data\Common\Internal\Materialization\Shaper.cs (13)
303targetKey.EntitySetName, (AssociationType)(targetMember.DeclaringType), targetMember.Name, out targetEntitySet);
366RelationshipWrapper wrapper = new RelationshipWrapper(associationSet, sourceMember.Name, sourceKey, targetMember.Name, targetKey);
389RelationshipWrapper wrapper = new RelationshipWrapper(associationSet, sourceMember.Name, sourceKey, targetMember.Name, targetKey);
399if(TryGetRelatedEnd(wrappedEntity, (AssociationType)targetMember.DeclaringType, sourceMember.Name, targetMember.Name, out relatedEnd))
425if (end.Name == sourceEndName)
429else if (end.Name == targetEndName)
706(AssociationType)sourceMember.DeclaringType, sourceMember.Name, out sourceEntitySet);
710Debug.Assert(associationSet.AssociationSetEnds[sourceMember.Name].EntitySet == sourceEntitySet);
729if (TryGetRelatedEnd(wrappedSource, (AssociationType)targetMember.DeclaringType, sourceMember.Name, targetMember.Name, out relatedEnd))
System\Data\EntityKey.cs (16)
747.As(singletonKeyMember.Name) };
759keyColumns[i] = DbExpressionBuilder.Constant(Helper.GetModelTypeUsage(keyMember), _compositeKeyValues[i]).As(keyMember.Name);
957singletonKeyValue = record[member.Name];
970compositeKeyValues[i] = record[member.Name];
1025if (_keyNames[0] != keyMembers[0].Name)
1029throw EntityUtil.MissingKeyValue(argumentName, keyMembers[0].Name, entitySet.ElementType.FullName);
1033throw EntityUtil.MissingKeyValueInvalidOperation(keyMembers[0].Name, entitySet.ElementType.FullName);
1058if (keyField.Name == _keyNames[j])
1072throw EntityUtil.MissingKeyValue(argumentName, keyField.Name, entitySet.ElementType.FullName);
1076throw EntityUtil.MissingKeyValueInvalidOperation(keyField.Name, entitySet.ElementType.FullName);
1108throw EntityUtil.IncorrectValueType(argumentName, keyMember.Name, entitySetKeyType.FullName, keyValue.GetType().FullName);
1112throw EntityUtil.IncorrectValueTypeInvalidOperation(keyMember.Name, entitySetKeyType.FullName, keyValue.GetType().FullName);
1128throw EntityUtil.IncorrectValueType(argumentName, keyMember.Name, expectedClrEnumType.FullName, keyValue.GetType().FullName);
1132throw EntityUtil.IncorrectValueTypeInvalidOperation(keyMember.Name, expectedClrEnumType.FullName, keyValue.GetType().FullName);
1140throw EntityUtil.NoCorrespondingOSpaceTypeForEnumKeyField(argumentName, keyMember.Name, keyMemberEdmType.FullName);
1144throw EntityUtil.NoCorrespondingOSpaceTypeForEnumKeyFieldInvalidOperation(keyMember.Name, keyMemberEdmType.FullName);
System\Data\Mapping\DefaultObjectMappingItemCollection.cs (15)
308EdmProperty clrProperty = new EdmProperty(column.Name, TypeUsage.Create(clrPropertyType));
347EdmProperty cdmPorperty = new EdmProperty(column.Name, TypeUsage.Create(cdmPropertyType));
494if (!objectType.Members.TryGetValue(edmMember.Name, false/*ignoreCase*/, out objectMember))
497edmMember.Name, edmMember.DeclaringType.FullName, objectType.FullName));
512edmMember.Name, edmMember.DeclaringType.FullName, edmMember.BuiltInTypeKind,
513objectMember.Name, objectMember.DeclaringType.FullName, objectMember.BuiltInTypeKind));
522edmMember.TypeUsage.EdmType.Name, edmMember.TypeUsage.EdmType.BuiltInTypeKind, edmMember.Name, edmMember.DeclaringType.FullName,
523objectMember.TypeUsage.EdmType.Name, objectMember.TypeUsage.EdmType.BuiltInTypeKind, objectMember.Name, objectMember.DeclaringType.FullName));
535edmMember.TypeUsage.EdmType.FullName, edmMember.Name, edmMember.DeclaringType.FullName,
536objectMember.TypeUsage.EdmType.FullName, objectMember.Name, objectMember.DeclaringType.FullName));
572edmMember.TypeUsage.EdmType.FullName, edmMember.Name, edmMember.DeclaringType.FullName,
573objectMember.TypeUsage.EdmType.FullName, objectMember.Name, objectMember.DeclaringType.FullName));
679member.Name, objectStructuralType.FullName, cdmStructuralType.FullName));
765edmEnd.RelationshipMultiplicity, edmEnd.Name, association.FullName,
766objectEnd.RelationshipMultiplicity, objectEnd.Name, objectAssociation.FullName));
System\Data\Mapping\StorageMappingItemLoader.cs (22)
1229currentEnd.Name, existingEnd.Name, associationSet.Name),
2391var cTypeColumn = cTypeTvfElementType.Properties[column.Name];
2402Strings.Mapping_InvalidContent_ConditionMapping_InvalidPrimitiveTypeKind, column.Name, column.TypeUsage.EdmType.FullName,
2457Strings.Mapping_Invalid_CSide_ScalarProperty(property.Name),
2470if (functionImportKB.ReturnTypeColumnsRenameMapping.TryGetValue(property.Name, out columnRenameMapping))
2478columnName = property.Name;
2513Strings.Mapping_FunctionImport_PropertyNotMapped(property.Name, structuralType.FullName, functionImport.Identity),
2707Strings.Mapping_InvalidContent_Duplicate_Condition_Member, member.Name,
2805Strings.Mapping_InvalidContent_Duplicate_Condition_Member, member.Name,
2887member.Name),
3106Strings.Mapping_InvalidContent_Duplicate_Condition_Member, member.Name,
3156AddToSchemaErrorsWithMemberInfo(Strings.Mapping_InvalidContent_EndProperty, scalarMap.EdmProperty.Name,
3249AddToSchemaErrorWithMessage(Strings.Mapping_ProviderReturnsNullType(conditionMember.Name),
3267conditionMember.Name, edmType.FullName, StorageMappingErrorCode.ConditionError,
3315AddToSchemaErrorsWithMemberInfo(Strings.Mapping_InvalidContent_ConditionMapping_Computed, columnMember.Name,
3641member.Name,
3667cSpaceMember.Name,
3670sSpaceMember.Name,
3866property.Name, StringUtil.ToCommaSeparatedString(columnNames),
4153typeName, property.Name, StorageMappingErrorCode.InvalidComplexType,
4290property.Name,
System\Data\Mapping\Update\Internal\RelationshipConstraintValidator.cs (8)
148string endName = field.FieldType.Name;
165EntityKey toEntityKey = endNameToKeyMap[toEnd.CorrespondingAssociationEndMember.Name];
208count, expectedRelationship.FromEnd.Name,
242actualRelationship.FromEnd.Name, actualRelationship.ToEnd.Name, violationCount.Value),
267actualRelationship.ToEnd.Name, actualRelationship.StateEntry);
483AssociationSet.Name, FromEnd.Name, ToEnd.Name, StringUtil.BuildDelimitedList(ToEntityKey.EntityKeyValues, null, null));
System\Data\Metadata\ObjectLayer\ObjectItemConventionAssemblyLoader.cs (14)
398string message = Strings.Validator_OSpace_Convention_MissingRequiredProperty(cspaceProperty.Name, type.FullName);
437cspaceProperty.Name, type.FullName);
492EdmProperty property = new EdmProperty(cspaceProperty.Name, TypeUsage.Create(propertyType, new FacetValues { Nullable = false }), clrProperty, type.TypeHandle);
541NavigationProperty navigationProperty = new NavigationProperty(cspaceProperty.Name, TypeUsage.Create(targetType), clrProperty);
546navigationProperty.ToEndMember = (RelationshipEndMember)((RelationshipType)ospaceRelationship).Members.First(e => e.Name == cspaceProperty.ToEndMember.Name);
547navigationProperty.FromEndMember = (RelationshipEndMember)((RelationshipType)ospaceRelationship).Members.First(e => e.Name == cspaceProperty.FromEndMember.Name);
591string message = Strings.Validator_OSpace_Convention_MissingRequiredProperty(cspaceProperty.Name, type.FullName);
612string message = Strings.Validator_OSpace_Convention_MissingRequiredProperty(cspaceProperty.Name, type.FullName);
704ospaceAssociation.AddKeyMember(new AssociationEndMember(cspaceEnd.Name, ospaceEndType.GetReferenceType(), cspaceEnd.RelationshipMultiplicity));
721return clrProperty.Name == cspaceMember.Name;
726return !clrProperty.PropertyType.IsValueType && !clrProperty.PropertyType.IsAssignableFrom(typeof(string)) && clrProperty.Name == cspaceMember.Name;
758cspaceProperty.Name,
System\Data\Objects\EntityEntry.cs (30)
2102var reference = RelationshipManager.GetRelatedEndInternal(dependent.Item1.ElementType.FullName, dependent.Item2.FromRole.Name) as EntityReference;
2137RelatedEnd relatedEnd = rm.GetRelatedEndInternal(n.RelationshipType.FullName, n.ToEndMember.Name);
2148throw new EntityException(System.Data.Entity.Strings.ObjectStateEntry_UnableToEnumerateCollection(n.Name, this.Entity.GetType().FullName));
2186RelatedEnd otherRelatedEnd = relatedWrapper.RelationshipManager.GetRelatedEndInternal(n.RelationshipType.FullName, n.FromEndMember.Name);
2257RelatedEnd relatedEnd = this.WrappedEntity.RelationshipManager.GetRelatedEndInternal(n.RelationshipType.FullName, n.ToEndMember.Name);
2271throw new EntityException(System.Data.Entity.Strings.ObjectStateEntry_UnableToEnumerateCollection(n.Name, this.Entity.GetType().FullName));
2542dependent.Item1.ElementType.FullName, dependent.Item2.FromRole.Name) as EntityReference;
2592EntityReference entityReference = (EntityReference)relationshipManager.GetRelatedEndInternal(targetMember.DeclaringType.FullName, targetMember.Name);
2730thisRole = this.GetAssociationEndMember(relationshipEntry).Name;
2733if (constraint.ToRole.Name == thisRole)
2744if (constraint.FromProperties[i].Name == pair.Key)
2746EntityEntry.AddOrIncreaseCounter(properties, constraint.ToProperties[i].Name, pair.Value);
2803thisRole = this.GetAssociationEndMember(relationshipEntry).Name;
2806if (constraint.FromRole.Name == thisRole)
2815if (constraint.ToProperties[i].Name == pair.Key)
2817if (!ByValueEqualityComparer.Default.Equals(GetCurrentEntityValue(constraint.FromProperties[i].Name), pair.Value))
2927if (!properties.ContainsKey(member.Name))
2929properties[member.Name] = new KeyValuePair<object, IntBox>(this.GetCurrentEntityValue(member.Name), new IntBox(1));
3297throw EntityUtil.NullableComplexTypesNotSupported(field.FieldType.Name);
3426dependent.Item1.ElementType.FullName, dependent.Item2.FromRole.Name) as EntityReference;
3654EntityReference relatedEnd = (RelatedEnd)RelationshipManager.GetRelatedEnd(principalRole.DeclaringType.FullName, principalRole.Name) as EntityReference;
3702EntityReference reference = RelationshipManager.GetRelatedEndInternal(dependent.Item1.ElementType.FullName, dependent.Item2.FromRole.Name) as EntityReference;
3755RelatedEnd principalEnd = RelationshipManager.GetRelatedEndInternal(principal.Item1.ElementType.FullName, principal.Item2.ToRole.Name);
3765int dependentOrdinal = dependentEntry._cacheTypeMetadata.GetOrdinalforOLayerMemberName(dependentProp.Name);
3799if (property.Name == propertyName)
3816if (property.Name == propertyName)
3822relationships.Add(new Pair<string, string>(dependent.Item1.ElementType.FullName, dependent.Item2.FromRole.Name));
3863associationSet.ElementType.FullName, constraint.FromRole.Name) as EntityReference;
3889dependent.Item1.ElementType.FullName, dependent.Item2.FromRole.Name) as EntityReference;
System\Data\Objects\Internal\EntityProxyFactory.cs (11)
460PropertyInfo property = EntityUtil.GetTopProperty(proxyType, member.Name);
461Debug.Assert(property != null, String.Format(CultureInfo.CurrentCulture, "Expected property {0} to be defined on proxy type {1}", member.Name, proxyType.FullName));
463FieldInfo interceptorField = proxyType.GetField(LazyLoadImplementor.GetInterceptorFieldName(member.Name), BindingFlags.DeclaredOnly | BindingFlags.Static | BindingFlags.NonPublic);
464Debug.Assert(interceptorField != null, String.Format(CultureInfo.CurrentCulture, "Expected interceptor field for property {0} to be defined on proxy type {1}", member.Name, proxyType.FullName));
674PropertyInfo baseProperty = EntityUtil.GetTopProperty(BaseType, member.Name);
675PropertyBuilder propertyBuilder = TypeBuilder.DefineProperty(member.Name, System.Reflection.PropertyAttributes.None, baseProperty.PropertyType, Type.EmptyTypes);
845PropertyInfo clrProperty = EntityUtil.GetTopProperty(ospaceEntityType.ClrType, member.Name);
1087PropertyInfo clrProperty = EntityUtil.GetTopProperty(ospaceEntityType.ClrType, member.Name);
1180generator.Emit(OpCodes.Ldstr, navProperty.Key.ToEndMember.Name);
1359generator.Emit(OpCodes.Ldstr, navProperty.ToEndMember.Name);
1383generator.Emit(OpCodes.Ldstr, navProperty.ToEndMember.Name);
System\Data\Objects\ObjectStateManager.cs (12)
812RelatedEnd relatedEnd = wrappedSource.RelationshipManager.GetRelatedEndInternal(sourceMember.DeclaringType.FullName, targetMember.Name);
979RelatedEnd relatedEnd = wrappedSource.RelationshipManager.GetRelatedEndInternal(sourceMember.DeclaringType.FullName, targetMember.Name);
1058RelationshipWrapper wrapper = new RelationshipWrapper(associationSet, sourceMember.Name, sourceKey, targetMember.Name, targetKey);
1087RelatedEnd relatedEnd = wrappedSource.RelationshipManager.GetRelatedEndInternal(sourceMember.DeclaringType.FullName, targetMember.Name);
1383UnloadReferenceRelatedEnds(cache, relationshipEntry, relationshipEntry.RelationshipWrapper.GetEntityKey(0), endMembers[1].Name);
1384UnloadReferenceRelatedEnds(cache, relationshipEntry, relationshipEntry.RelationshipWrapper.GetEntityKey(1), endMembers[0].Name);
1483int ordinal = typeMetadata.GetOrdinalforCLayerMemberName(keyField.Name);
1490object keyValue = entityKey.FindValueByName(keyField.Name);
3272constraint.ToProperties[i].Name,
3273retrievedProperties[constraint.FromProperties[i].Name].Key);
3728string keyName = keyMembers[i].Name;