我有一个控制器名称MailingAddress和starup.cs我用下面的代码设置odataroute。如果我指定相同的odataroute用于构建2个实体我得到运行时错误。我们如何建立两个具有相同odata的实体路由,以便使用相同的名称调用get和post?
builder.EntitySet<BEAccountAddresses>("MailingAddresses");
builder.EntitySet<BEMailingAddressesRequest>("MailingAddresses");
[HttpPost]
[ODataRoute("MailingAddress")]
public BEMailingAddressConfirmation AddMailingAddresses(BEMailingAddressesRequest beMailingAddressesRequest)
[HttpGet]
[EnableQuery]
[ODataRoute("MailingAddresses({key})")]enter `enter code here`code here
public BEAccountAddresses Get([FromODataUri]string key)