Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bartdebever/AspNetCoreApiTemplate
A basic ASP.Net Core template for APIs with Serilog, Swagger and EntityFramework Core
https://github.com/bartdebever/AspNetCoreApiTemplate
Last synced: 3 days ago
JSON representation
A basic ASP.Net Core template for APIs with Serilog, Swagger and EntityFramework Core
- Host: GitHub
- URL: https://github.com/bartdebever/AspNetCoreApiTemplate
- Owner: bartdebever
- Created: 2019-04-11T16:43:35.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2019-04-11T18:34:05.000Z (about 5 years ago)
- Last Synced: 2024-03-09T18:39:03.961Z (4 months ago)
- Language: C#
- Homepage:
- Size: 27.3 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Lists
- awesome-asp-net - AspNetCoreApiTemplate - Made with Swagger, Serilog, EntityFramework Core and implements a basic Service-Repository structure. (Boiler Plates / Web API (Core))
README
# AspNetCore Api Template
A basic ASP.NET Core template to easily create an ASP.NET Core API,
build on dotnet Core 2.2.This template comes with:
- EntityFramework Core
- Serilog
- Swagger
- Basic CRUD Services and Repository implementation.Dependencies installed but not used:
- AutoMapper
- NUnit
- FluentAssertionsYou can also check out the `Optionals` folder to find items like a basic `.travis.yml` file and a Dockerfile *(coming soon)*.
## Running the project
It's recommended you launch without IIS to make full use of Serilog.
The project should launch to `baseUrl/index.html` and display the SwaggerUI.The JSON that powers the UI is found at `baseUrl/swagger/v1/swagger.json`
## Personalized appsettings.json
The project is configured to allow the overwriting of appsettings.json if you are working with multiple people.
The project will look for `appsettings.NAME.json` where the name is provided in the startup arguments.
To add your configuration, add the `NAME` in the `Template.Api's Application Arguments`.## CORS
CORS is currently configured to allow requests from `http://localhost:4200`.
This is the default URL for Angular projects and should be changed.
This can be found at `Template.Api.Startup line 82`.## Serilog
Serilog is configured to log to file and console with a minimum level of `Information`.
You can configure Serilog by editing your `appsettings.json`.## EntityFramework Core
EF Core is configured from the `appsettings.json` under the DefaultConnection.
Currently `SqlServer` is the only installed provider.