dotnet new web
dotnet restore
dotnet run
View Changes
dotnet package add Microsoft.AspNetCore.Mvc
dotnet restore
-
Add
services.AddMvc();
to theConfigureServices
method. -
Add
app.UseMvcWithDefaultRoute();
to theConfigure
method. -
Create a
Home
controller andIndex
action.
dotnet new library
dotnet add package System.Xml.XmlSerializer
dotnet restore
dotnet new sln
dotnet sln add ./src/Web/Web.csproj
dotnet sln add ./src/CatApi/CatApi.csproj
dotnet add reference ../CatApi/CatApi.csproj
dotnet restore
dotnet run
Add logging to the API client to help with debugging.
dotnet add package Microsoft.Extensions.Logging
Add a ViewModel, call the API etc., add a View to display everything.
dotnet new xunit
dotnet add reference ../../src/CatApi/CatApi.csproj
dotnet restore
Don't forget to add it to the solution.
dotnet test ./tests/CatApiTests/CatApiTests.csproj