How to make OData v4 function/action strings Unico

2019-07-20 05:54发布

问题:

Say, I have an action definition like so

builder.EntitySet<Ent>("Ent");
var companyActionConfig = builder.EntityType<Ent>().Action("MethodX");
entActionConfig.Parameter<int>("SomeParam1");
entActionConfig.Parameter<string>("SomeParam2");
entActionConfig.Returns<bool>();

Then in the metadata the result look like so

<Action Name="MethodX" IsBound="true">
    <Parameter Name="bindingParameter" Type="Ent"/>
    <Parameter Name="SomeParam1" Type="Edm.Int32" Nullable="false"/>
    <Parameter Name="SomeParam2" Type="Edm.String" Unicode="false"/>
    <ReturnType Type="Edm.Boolean" Nullable="false"/>
</Action>

Here Unicode is false. Does this definition work just like .NET string or how should one make it appear as Unicode="true"?

How could I make Unicode="true"?