WebApiCoreKata

In progress ...

Goal

Create a WebApi Kata to develop a Web API using:

  • TDD
  • Hexagonal Architecture (with DTO and anti-corruption layers)
  • Microsoft.AspNetCore.Mvc.Testing
  • Microsoft.EntityFrameworkCore

EF steps

Create KataContext (EF DbContext):

dotnet ef dbcontext scaffold "Server=(local)\SQLEXPRESS;Database=WebApiCoreKata;Trusted_Connection=True;" Microsoft.EntityFrameworkCore.SqlServer -o Database -c KataContext

Add customers to the context:

public DbSet<CustomerDto> Customers { get; set; }

Create the migration:

dotnet ef migrations add add_customers

Apply migration:

dotnet ef database update