Skip to content

.Net Core 3.0 Web Api design versioning, Jwt, Swagger, xUnit, Serilog, EF Core, DI, Repository, Docker

Notifications You must be signed in to change notification settings

eyupgevenim/dot-net-core-3.0-blog-api

Repository files navigation

.Net Core 3.0 Web API Design

.Net Core 3.0 Web Api design versioning, Jwt bearer authentication, swagger documentation, serilog logger, EF Core Repository pattern, Db Migration, xUnit Tests, dependency injection and project layers

Project layers

solution

solution

Web Api versioning

v1.0
versioning

v1.1
versioning

Jwt bearer authentication

Jwt token

Swagger documentation

Swagger documentation

Migration

edit var connectionString =""; in DbContextFactory.cs and go .....\Blog\src\Libraries\Blog.Data path open on CLI and run commands

#restore Blog.Data project
...Blog.Data_> dotnet restore

#build Blog.Data project
...Blog.Data_> dotnet build

#add Initial name migrations 
...Blog.Data_> dotnet ef migrations add Initial

#Update migrations on database
...Blog.Data_> dotnet ef database update
#dotnet ef database update Initial

EF Core Repository

mapping
mapping

DbContext
db-context

Generic repository
repository

Dependency injection
DI

xUnit Tests

Service test
xUnit service Tests

Integration test
xUnit integration Tests

Passed Tests
xUnit integration Tests

Serilog Logger

serilog