asp.net web api - WebAPI - config.EnableQueryOptions is marked as depreciated what is the gudance now? -
i building webapi 2 project, , thought of enabling odata query support. done including odata nuget bundle , enabling via config.enableqeyoptions()
i notice method marked depreciated cant find out should utilize instead. know?
if referring nugget bundle microsoft.aspnet.odata
then sample code this
public static void register(httpconfiguration config) { // new code: odatamodelbuilder builder = new odataconventionmodelbuilder(); builder.entityset<product>("products"); config.mapodataserviceroute( routename: "odataroute", routeprefix: null, model: builder.getedmmodel()); }
you can find total post here http://www.asp.net/web-api/overview/odata-support-in-aspnet-web-api/odata-v4/create-an-odata-v4-endpoint
asp.net-web-api asp.net-web-api2
No comments:
Post a Comment