private void BuildReflectionEpmInfo(ResourceType resourceType) { if (resourceType.ResourceTypeKind == ResourceTypeKind.EntityType) { var instanceType = resourceType.InstanceType; var attributes = (EntityPropertyMappingAttribute[])instanceType.GetCustomAttributes(typeof(EntityPropertyMappingAttribute), resourceType.BaseType == null); for (int i = 0; i < attributes.Length; i++) { var attribute = attributes[i]; resourceType.AddEntityPropertyMappingAttribute(attribute); } } }