System\Data\Common\EntitySql\SemanticAnalyzer.cs (11)
330ValidateQueryResultType(property.TypeUsage, errCtx);
1599if (!TypeSemantics.IsStructurallyEqualOrPromotableTo(refType, toEnd.TypeUsage.EdmType))
1601throw EntityUtil.EntitySqlError(relshipExpr.RefExpr.ErrCtx, Strings.RelatedEndExprTypeMustBePromotoableToToEnd(refType.FullName, toEnd.TypeUsage.EdmType.FullName));
1607.Where (e => TypeSemantics.IsStructurallyEqualOrPromotableTo(refType, e.TypeUsage.EdmType) &&
1634if (!TypeSemantics.IsStructurallyEqualOrPromotableTo(driverEntityType.GetReferenceType(), fromEnd.TypeUsage.EdmType))
1637Strings.SourceTypeMustBePromotoableToFromEndRelationType(driverEntityType.FullName, fromEnd.TypeUsage.EdmType.FullName));
1647.Where(e => TypeSemantics.IsStructurallyEqualOrPromotableTo(driverEntityType.GetReferenceType(), e.TypeUsage.EdmType) &&
1734if (!TypeSemantics.IsStructurallyEqualOrPromotableTo(sourceRefType, fromEnd.TypeUsage.EdmType))
1737Strings.SourceTypeMustBePromotoableToFromEndRelationType(sourceRefType.FullName, fromEnd.TypeUsage.EdmType.FullName));
1747.Where (e => TypeSemantics.IsStructurallyEqualOrPromotableTo(sourceRefType, e.TypeUsage.EdmType) &&
2970if (!TypeHelpers.IsValidDistinctOpType(rowType.Members[i].TypeUsage))
System\Data\Mapping\DefaultObjectMappingItemCollection.cs (36)
307EdmType clrPropertyType = ConvertCSpaceToOSpaceType(column.TypeUsage.EdmType);
346EdmType cdmPropertyType = ConvertOSpaceToCSpaceType(column.TypeUsage.EdmType);
517if (edmMember.TypeUsage.EdmType.BuiltInTypeKind != objectMember.TypeUsage.EdmType.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));
526if (Helper.IsPrimitiveType(edmMember.TypeUsage.EdmType))
528PrimitiveType memberType = Helper.GetSpatialNormalizedPrimitiveType(edmMember.TypeUsage.EdmType);
531if (memberType.PrimitiveTypeKind != ((PrimitiveType)objectMember.TypeUsage.EdmType).PrimitiveTypeKind)
535edmMember.TypeUsage.EdmType.FullName, edmMember.Name, edmMember.DeclaringType.FullName,
536objectMember.TypeUsage.EdmType.FullName, objectMember.Name, objectMember.DeclaringType.FullName));
539else if (Helper.IsEnumType(edmMember.TypeUsage.EdmType))
542Helper.IsEnumType(objectMember.TypeUsage.EdmType),
545ValidateEnumTypeMapping((EnumType)edmMember.TypeUsage.EdmType, (EnumType)objectMember.TypeUsage.EdmType);
554edmMemberType = ((RefType)edmMember.TypeUsage.EdmType).ElementType;
555objectMemberType = ((RefType)objectMember.TypeUsage.EdmType).ElementType;
558Helper.IsCollectionType(edmMember.TypeUsage.EdmType))
560edmMemberType = ((CollectionType)edmMember.TypeUsage.EdmType).TypeUsage.EdmType;
561objectMemberType = ((CollectionType)objectMember.TypeUsage.EdmType).TypeUsage.EdmType;
565edmMemberType = edmMember.TypeUsage.EdmType;
566objectMemberType = objectMember.TypeUsage.EdmType;
572edmMember.TypeUsage.EdmType.FullName, edmMember.Name, edmMember.DeclaringType.FullName,
573objectMember.TypeUsage.EdmType.FullName, objectMember.Name, objectMember.DeclaringType.FullName));
589Helper.IsScalarType(edmProperty.TypeUsage.EdmType),
592Helper.IsScalarType(objectProperty.TypeUsage.EdmType),
635if (Helper.IsComplexType(edmMember.TypeUsage.EdmType))
769Debug.Assert(edmEnd.TypeUsage.EdmType.BuiltInTypeKind == BuiltInTypeKind.RefType, "Ends must be of Ref type");
773LoadTypeMapping(((RefType)edmEnd.TypeUsage.EdmType).ElementType,
774((RefType)objectEnd.TypeUsage.EdmType).ElementType, ocItemCollection, typeMappings);
793Debug.Assert(containingEdmMember.TypeUsage.EdmType.BuiltInTypeKind == BuiltInTypeKind.ComplexType, "edm member declaringType must be of complexType");
794Debug.Assert(containingClrMember.TypeUsage.EdmType.BuiltInTypeKind == BuiltInTypeKind.ComplexType, "clr member declaringType must be of complexType");
796ComplexType edmComplexType = (ComplexType)containingEdmMember.TypeUsage.EdmType;
797ComplexType objectComplexType = (ComplexType)containingClrMember.TypeUsage.EdmType;
System\Data\Mapping\StorageMappingItemLoader.cs (27)
2278if (!ValidateFunctionImportMappingResultTypeCompatibility(TypeUsage.Create(scalarResultType), cTypeTvfElementType.Properties[0].TypeUsage))
2393Debug.Assert(Helper.IsPrimitiveType(cTypeColumn.TypeUsage.EdmType), "S-space columns are expected to be of a primitive type.");
2394var cPrimitiveType = (PrimitiveType)cTypeColumn.TypeUsage.EdmType;
2402Strings.Mapping_InvalidContent_ConditionMapping_InvalidPrimitiveTypeKind, column.Name, column.TypeUsage.EdmType.FullName,
2454if (!Helper.IsScalarType(property.TypeUsage.EdmType))
2487if (ValidateFunctionImportMappingResultTypeCompatibility(property.TypeUsage, cTypeColumn.TypeUsage))
2883if (!Helper.IsScalarType(member.TypeUsage.EdmType))
2934memberType = member.TypeUsage.EdmType;
3142RefType endRef = end.TypeUsage.EdmType as RefType;
3238EdmType edmType = conditionMember.TypeUsage.EdmType;
3246cspaceTypeUsage = StoreItemCollection.StoreProviderManifest.GetEdmType(conditionMember.TypeUsage);
3257cspaceTypeUsage = conditionMember.TypeUsage;
3598Helper.IsScalarType(member.TypeUsage.EdmType),
3600Debug.Assert(Helper.IsPrimitiveType(columnMember.TypeUsage.EdmType), "s-space column type must be primitive");
3629m_scalarMemberMappings.Add(member, new KeyValuePair<TypeUsage, TypeUsage>(storeEquivalentTypeUsage, columnMember.TypeUsage));
3636TypeUsage modelColumnMember = columnMember.TypeUsage.GetModelTypeUsage();
3637if (!Object.ReferenceEquals(columnMember.TypeUsage.EdmType, storeMappedTypeUsage.EdmType))
3651else if (!TypeSemantics.IsSubTypeOf(ResolveTypeUsageForEnums(member.TypeUsage), modelColumnMember))
3666cSpaceMember.TypeUsage.EdmType + GetFacetsForDisplay(cSpaceMember.TypeUsage),
3669sSpaceMember.TypeUsage.EdmType + GetFacetsForDisplay(sSpaceMember.TypeUsage),
4147if (!property.TypeUsage.EdmType.Equals(complexType) &&
4148!Helper.IsSubtypeOf(property.TypeUsage.EdmType, complexType))
4279property.TypeUsage,
4289property.TypeUsage.EdmType,