question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Aspnetcore 3.1 with OData

See original GitHub issue

If you’re creating a bug/problem report, please include followings:

  • Your Abp package version. - 5.2
  • Your base framework: .Net Core. 3.1

Aspnetboilerplate Angular Template 5.2

Integration with the explanation from the page: https://aspnetboilerplate.com/Pages/Documents/OData-AspNetCore-Integration

in .net core 3.1 mvc.internal is removed:

Could not load type 'Microsoft.AspNetCore.Mvc.Internal.ActionConstraintCache' from assembly 'Microsoft.AspNetCore.Mvc.Core, Version=3.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'.'
// Configure Abp and Dependency Injection
return services.AddAbp<OdataWebHostModule>(
    // Configure Log4Net logging
    options => options.IocManager.IocContainer.AddFacility<LoggingFacility>(
        f => f.UseAbpLog4Net().WithConfig("log4net.config")
    )
);

Do you found any workaround?

It worked with .net Core 3.1 Standard project template without endpoints:

public void ConfigureServices(IServiceCollection services)
{
    services.AddControllers(mvcOptions =>
       mvcOptions.EnableEndpointRouting = false);

    services.AddOData();
}
app.UseMvc(routeBuilder =>
{
    routeBuilder.Select().Filter();
    routeBuilder.MapODataServiceRoute("odata", "odata", GetEdmModel());
});

//app.UseEndpoints(endpoints =>
//{
//    endpoints.MapControllers();
//});

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
malimingcommented, Mar 3, 2020

@ryancyq #5196 just updated a package, we have not released the Abp.AspNetCore.OData package and updated the documentation and examples.

1reaction
ismcagdascommented, Mar 3, 2020

@maliming yes, the related issue https://github.com/OData/WebApi/issues/1748 was open when we move to ASP.NET Core 3.0. It seems like now it supports .NET Core 3.x. We can implement this in 5.4, what do you think ?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Experimenting with OData in ASP.NET Core 3.1
It is good to get selective properties with OData but it makes no great difference/performance gain without passing this selection to data layer ......
Read more >
Using OData with ASP.NET Core Web API
In this article, we will learn how to implement support for the OData standard in our ASP.NET Core Web API services.
Read more >
ASP.NET Core 3.1 and OData For Starters
The OData (Open Data Protocol) is a data access protocol for sharing data in a standardized format for easy consumptions by other systems....
Read more >
Enabling OData in ASP.NET Core 3.1 (Experimental) - YouTube
Here's a link to my ASP.NET Core 3.1 API project with OData (beta) enabled: https://github.com/hassanhabib/OData3Beta Here's a step by step ...
Read more >
How to use OData with ASP.NET Core Web API
In this article, let's look at how we can add OData capabilities to a simple Web API using the latest OData package and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found