Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aimenux/webapihostingdemo
Using various hosting ways in order to setup a web api
https://github.com/aimenux/webapihostingdemo
fluent-assertions integration-testing minimal-api net60 nsubstitute serilog webapi
Last synced: 23 days ago
JSON representation
Using various hosting ways in order to setup a web api
- Host: GitHub
- URL: https://github.com/aimenux/webapihostingdemo
- Owner: aimenux
- Created: 2022-07-28T16:36:14.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-10-04T21:39:09.000Z (over 2 years ago)
- Last Synced: 2024-11-11T15:16:21.542Z (3 months ago)
- Topics: fluent-assertions, integration-testing, minimal-api, net60, nsubstitute, serilog, webapi
- Language: C#
- Homepage:
- Size: 21.5 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[![.NET](https://github.com/aimenux/WebApiHostingDemo/actions/workflows/ci.yml/badge.svg)](https://github.com/aimenux/WebApiHostingDemo/actions/workflows/ci.yml)
# WebApiHostingDemo
```
Exploring various hosting ways in order to setup a web api
```> In this repo, i m exploring various hosting ways in order to setup a web api
>
> :one: `Example01` use default template with controller(s) and [top level statements](https://docs.microsoft.com/en-us/dotnet/csharp/whats-new/tutorials/top-level-statements) program class
>
> :two: `Example02` use startup class with controller(s) and program class based on [generic host](https://docs.microsoft.com/en-us/aspnet/core/fundamentals/host/generic-host)
>
> :three: `Example03` use startup class with controller(s) and program class based on [web application](https://docs.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.builder.webapplication)
>
> :four: `Example04` is very similar to `Example03` with an [elegant way to call startup class behind the scenes](https://www.strathweb.com/2022/02/using-an-existing-startup-class-with-asp-net-6-minimal-hosting-model/)
>
> :five: `Example05` use [minimal api template](https://docs.microsoft.com/en-us/aspnet/core/tutorials/min-web-api)
>**`Tools`** : vs22, net 6.0, web api, serilog, integration-testing, fluent-assertions, nsubstitute