TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Deepali P
NA
34
594
ASP.NetCore3.1 and OData
Nov 13 2020 10:08 AM
I am working with ASP.NET Core3.1 and OData.The sisue I have is as follows:
Startup.cs added:
public void ConfigureServices(IServiceCollection services)
{
services.AddOData();
}
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
app.UseEndpoints(endpoints =>
{
endpoints.MapHealthChecks("/health");
endpoints.MapControllers();
endpoints.Select().Filter().OrderBy().Expand().Count().MaxTop(50);
endpoints.MapODataRoute("odata", "odata", GetEdmModel(app.ApplicationServices));
});
}
private IEdmModel GetEdmModel(IServiceProvider serviceProvider)
{
var builder = new ODataConventionModelBuilder(serviceProvider);
builder.EntitySet<TestController>("testcontrollers");
return builder.GetEdmModel();
}
However when accessing odata points I always get 404 error.
Reply
Answers (
1
)
Show a message through a controller “Attendance is already marked”
Good Example for bi-directional Communication between Python and Windo