I'm following this video on creating service stack for Entity Framework and the video uses
config.Routes.MapODataRoute("odata", "odata", builder.GetEdmModel());
in their WebApiConfig file. I am using the same piece of code in my project and I'm getting this error:
System.InvalidOperationException: 'The complex type 'ClassLibrary1.Session' refers to the entity type 'ClassLibrary1.Customer' through the property 'Customer'.'
for this piece of code:
var builder = new ODataConventionModelBuilder();
builder.EntitySet<Customer>("Customers");
config.Routes.MapODataRoute("odata", "odata", builder.GetEdmModel());
And when I hover over the method it says deprecated:
So what do I use here to get the same output of the video.