Simple RESTful API built with ASP.NET 5 to show how to create RESTful services using a decoupled, maintainable architecture.
- ASP.NET 5;
- Entity Framework Core (for data access);
- EntityFrameworkCore.SqlServer (for SqlServer);
- EntityFrameworkCore.Tools (EF tools)
- Swashbuckle (API documentation)
- AutoMapper.Extensions.Microsoft.DependencyInjection (dependency injection)
- AutoMapper (for mapping resources and models);
First, install .NET 6. Then, open the terminal or command prompt at the API root path (/src/CompanyWebApi/
) and run the following commands, in sequence:
dotnet restore
dotnet run
Navigate to https://localhost:44395/api/Companies
to check if the API is working. If you see a HTTPS security error, just add an exception to see the results.
Navigate to https://localhost:44395/swagger/
to check the API documentation and to test all API endpoints.