【发布时间】:2015-04-16 18:23:27
【问题描述】:
我已经安装了来自https://visualstudiogallery.msdn.microsoft.com/9b786c0e-79d1-4a50-89a5-125e57475937的OData客户端代码生成器tt模板
并尝试将它们指向我的 ASP MVC OData 端点,还尝试了 Edmx,但都无法正常工作。我设法保存了 tt 文件,但生成的 ODataClient.cs 文件为空。
这是我的 ASP MVC OData 读取方式(无需登录和身份验证)
<service xml:base="http://xxx.azurewebsites.net/odata">
<workspace>
<atom:title type="text">Default</atom:title>
<collection href="Accesses">
<atom:title type="text">Accesses</atom:title>
</collection>
<collection href="Badges">
<atom:title type="text">Badges</atom:title>
</collection>
<collection href="BadgeTypes">
<atom:title type="text">BadgeTypes</atom:title>
</collection>
<collection href="BookingItems">
<atom:title type="text">BookingItems</atom:title>
</collection>
<collection href="Bookings">
<atom:title type="text">Bookings</atom:title>
</collection>
<collection href="BookingStatuses">
<atom:title type="text">BookingStatuses</atom:title>
</collection>
<collection href="Countries">
<atom:title type="text">Countries</atom:title>
</collection>
<collection href="Holidays">
<atom:title type="text">Holidays</atom:title>
</collection>
<collection href="Hotels">
<atom:title type="text">Hotels</atom:title>
</collection>
<collection href="HotelStatuses">
<atom:title type="text">HotelStatuses</atom:title>
</collection>
<collection href="RackRates">
<atom:title type="text">RackRates</atom:title>
</collection>
</workspace>
</service>
【问题讨论】:
标签: asp.net-mvc odata