Base solution for your next web application
Open Closed

WebAPI Controller in .Net Core using Abp.Web.Api #4727


User avatar
0
devkev2403 created

Hi,

I want to write my own WebAPI based on the documentation here:

<a class="postlink" href="https://aspnetboilerplate.com/Pages/Documents/Web-API-Controllers">https://aspnetboilerplate.com/Pages/Doc ... ontrollers</a>

However, the nuget package is not for .NET Core. Is there a different approach for .NET Core?

Thanks


3 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    @devkev2403 in ASP.NET Core, you can use app services or regular ASP.NET Core Controllers for this. App services are automatically converted into API. If you also want to use regular controllers, you can mark then with Route attribute.

    You can check this document for more detail <a class="postlink" href="https://aspnetboilerplate.com/Pages/Documents/AspNet-Core">https://aspnetboilerplate.com/Pages/Doc ... spNet-Core</a>.

  • User Avatar
    0
    devkev2403 created

    Thank you, that is the approach I am taking after finding:

    <a class="postlink" href="https://docs.microsoft.com/en-us/aspnet/core/migration/webapi">https://docs.microsoft.com/en-us/aspnet ... ion/webapi</a>

    Good to know I am on the right track.

    Thanks again.

  • User Avatar
    0
    alper created
    Support Team

    congrats