Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[vNext] Roadmap for OData WebAPI run on ASP.NET Core 1.0 #772

Closed
alvachien opened this issue Jul 12, 2016 · 39 comments
Closed

[vNext] Roadmap for OData WebAPI run on ASP.NET Core 1.0 #772

alvachien opened this issue Jul 12, 2016 · 39 comments

Comments

@alvachien
Copy link

The ASP.NET Core 1.0 has officially released several weeks ago, the OData vNext (with alpha) still rely on 1.0 RC2 and cannot install from Nuget so far.

Does there any roadmap exist to support ASP.NET Core 1.0?

Thanks,
Alva

@VikingsFan
Copy link
Contributor

@alvachien we will have a discuss about the roadmap after the 6.0.0 release, thanks :)

@mterwoord
Copy link

@VikingsFan Would contributions for asp.net core support be accepted?

@VikingsFan
Copy link
Contributor

@mterwoord sure, contribution are always warmly welcome.

@mterwoord
Copy link

What's the branch to pick?

@VikingsFan
Copy link
Contributor

vNext branch, but now we are not actively develop in this branch, we'll have a roadmap for this after 6.0.0 release

@andygjp
Copy link

andygjp commented Aug 20, 2016

@VikingsFan when will v6 be released?

@VikingsFan
Copy link
Contributor

VikingsFan commented Aug 22, 2016

@alvachien 2-3 weeks after OData Lib release, OData Lib 7.0.0 beta is released, rtm will release around the end of this month

@aacanakin
Copy link

@alvachien Are there any updates on release date?

@bpenggithub
Copy link

Any updates on supporting ASP.NET Core 1.0?

@xuzhg
Copy link
Member

xuzhg commented Sep 19, 2016

@bpenggithub

Please follow up https://github.com/OData/WebApi/tree/vNext

And You are welcome to share your contributions.

Thanks.

@mowali
Copy link

mowali commented Oct 12, 2016

@xuzhg and @VikingsFan are we as of now at the rtm phase of ODATA support to Core? I'm not interested in the alpha or beta, only stable release will convince my other coworkers in the team.
I downloaded the sample and played with it. Most of its methods not working (I post a question about that) and I see that the sample project is using 6.0.0-alpha1-rtm, does it mean the ODATA is already rtm!? If not, when?

@xuzhg
Copy link
Member

xuzhg commented Nov 10, 2016

@mowali
The OData support to Asp.Net Core is not finished yet. The development is still going on. However such development slowed down in the past three months. I think once new resources are founded, the development will speed up.

We do hope all of you can share us your contributions on the support OData for Core. Thanks!

@xuzhg xuzhg added the high label Nov 10, 2016
@candidodmv
Copy link

I'm very excited about this.

@akorchev
Copy link

Hi. Is this feature still worked on?

@marcrocny
Copy link

Hello, what is the status on this? I see a fair number of commits on vNext but there hasn't been a release for a couple of years. Is vNext branch still accepting PRs?

@genusP
Copy link
Contributor

genusP commented Mar 24, 2017

View this issue #939

@lelong37
Copy link

lelong37 commented Apr 2, 2017

+100, would be awesome to get OData in ASP.NET Core :)

@akorchev
Copy link

Is there any way at least to get the OData version for net452 working with asp.net core?

@ysmoradi
Copy link
Contributor

@akorchev https://github.com/ysmoradi/OwinAspNetCore

@VVildVVolf
Copy link

As I see, it is possible to build it for the dotnet core. I checked the maintenance-aspnetcore, and after removing the 451 ref (tools/ResxGenerator/ResxGenerator.csproj and src/Microsoft.AspNetCore.OData/Microsoft.AspNetCore.OData.csproj) it works for the unix projects.

@robward-ms
Copy link
Contributor

First off, thanks to everyone for your patience. I know it’s taken a while to get here. Second, thanks to everyone who downloaded and provided feedback on the Alpha/nightly packages.

I’m happy to announce the Beta1 release of Web API OData for ASP.NET and ASP.NET Core. You can find the release notes here: http://odata.github.io/WebApi/#14-01-netcore-beta1

And you’ll find the package here: https://www.nuget.org/packages/Microsoft.AspNetCore.OData/

If you find issues, please file them here on GitHub and add the [feature/netcore] tag.

This is one of five issues tracking the ASP.NET Core version of OData WebApi. To streamline communication, I’m going to close this one and leave #939 open until RTM ships. Please us #939 for following status.

@egbertn
Copy link

egbertn commented Mar 17, 2018

Did anybody have a working Unit Test end to end testing (including http) and IoC?
Having difficulty on initializing a unit test on an OData Controller.
It always returns 404.

From the unit test it initialises with
var builder = WebHost.CreateDefaultBuilder().UseStartup<Startup>().UseDefaultServiceProvider(options => options.ValidateScopes = false);
....

public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
{
var builder = new ODataConventionModelBuilder(app.ApplicationServices, true) { Namespace = typeof(company).Namespace };

        BuildOData(builder);
        app.UseMvc(options =>
        {
            options.Count().Filter().OrderBy().Select().MaxTop(null).Expand();
            options.MapODataServiceRoute("ODataRoute", "odata", builder.GetEdmModel());
            options.EnableDependencyInjection();



            var applicationPartManager = options.ApplicationBuilder.ApplicationServices.GetRequiredService<ApplicationPartManager>();
            applicationPartManager.ApplicationParts.Clear();

            //if (controllers != null)
            //{
                var part = new AssemblyPart(new MockAssembly(new[] { typeof(CommunitiesController) }));
                applicationPartManager.ApplicationParts.Add(part);
            //}

            // Insert a custom ControllerFeatureProvider to bypass the IsPublic restriction of controllers
            // to allow for nested controllers which are excluded by the built-in ControllerFeatureProvider.
            applicationPartManager.FeatureProviders.Clear();
            applicationPartManager.FeatureProviders.Add(new TestControllerFeatureProvider());

        });

public void ConfigureServices(IServiceCollection services)
{

        services.AddMvc(options =>
        {
            //options.Filters.Add();
        }).AddApplicationPart(typeof(LahDiDahController).Assembly).AddControllersAsServices();



        services.AddTransient<ILadidah, Ladidah>();
public Startup(IHostingEnvironment env)
       {
           _iHostingEnvironment = env;
           var environmentName = Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT") ?? "Debug"; 
           var builder = new ConfigurationBuilder()
                         .SetBasePath(System.IO.Path.GetDirectoryName(AppContext.BaseDirectory))
                         .AddJsonFile("appsettings.json", optional: true, reloadOnChange: true)
                         .AddJsonFile($"appsettings.{environmentName}.json")
                         .AddEnvironmentVariables("ASPNETCORE_");

           if (env.IsDevelopment())
           {
           }
           Configuration = builder.Build();
       }

@robward-ms
Copy link
Contributor

@egbertn - There are now UTs and E2Es for AspNetCore checked in if this helps. Could you open an issue and include the controller and url you are using as well as the configuration?

@egbertn
Copy link

egbertn commented Mar 20, 2018

Hi @robward-ms thank you.
I found the reason. My controller was named with casing say: MyController
while the entitytype and the route was 'my'. In the previous OData version, this was solved automatically, (without ODataRoutePrefix) in the current version, the controller had to be renamed myController to get the routing fixed.

This also fixed my unit tests.

@xuzhg
Copy link
Member

xuzhg commented Jun 29, 2018

@ALL

ASP.NET Web API OData 7.0 is available on Nuget.org now, you can download it from:

  1. Microsoft.AspNetCore.OData is based on ASP.NET Core 2.0.
  2. Microsoft.AspNet.OData is based on ASP.NET Web API.

Please try it out and let us know any problems, concerns, questions. Thanks!

Regards,
-OData Team

@dimkoug
Copy link

dimkoug commented Oct 13, 2020

When i try to add

services.AddOData(); i get reference error

the web appication is razor pages web application in asp core 3

@egbertn
Copy link

egbertn commented Oct 13, 2020

This was a .CORE 1.0 app. I do not maintain this repo. Sorry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests