EdmProperty.Primitive is now public. When trying to use it with DbExpressionBuilder like this it may cause asserts:
var propertyExpression =
Since the declaring type is null. We should probably throw for this case and review other places in the DbExpressionBuilder where we assume that things that previously were not constructible publicly are set up correctly.