Create Self Hosted Web API or Use Asp.Net Core Web API?

浪子不回头ぞ 提交于 2019-12-06 08:13:52

I recommend option 2 i.e. ASP.NET Core Web API for following reasons

  • Now that ASP.NET Core 2 is out, it focused more on the better performance. Your API build will be minimal (takes in whats used in the application).
  • Core Web API can be built in most efficient way. The .NET Core code can help you deploy on non-windows machines.
  • API response is fast enough as lots of bottlenecks are avoided in the pipeline.

With Kestrel improvements, it beneficial to use ASP.NET Core 2. The Web API can be hosted on IIS/ Nginx or stand alone pretty easily.

I'd go with using dotnet core as well. As there will be ongoing improvement for the middlewares and Nuget packages thanks to the open source community. Being cross platform could be another plus .

Additionally, dot net core got decent performance and the middleware pipeline is flexible enough to say it could pretty much cover the self hosted flexibility features.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!