Building web APIs with ASP.NET core /
Building Web APIs with ASP.NET Core is a practical beginner’s guide to creating your first web APIs using ASP.NET Core. In it, you’ll develop an API that feeds web-based services, including websites and mobile apps, for a board games application. The book is cleverly structured to mirror a real-worl...
Clasificación: | Libro Electrónico |
---|---|
Autor principal: | |
Formato: | Electrónico eBook |
Idioma: | Inglés |
Publicado: |
Shelter Island, NY :
Manning Publications,
[2023]
|
Edición: | [First edition]. |
Temas: | |
Acceso en línea: | Texto completo (Requiere registro previo con correo institucional) |
Tabla de Contenidos:
- Intro
- inside front cover
- Building Web APIs with ASP.NET Core
- Copyright
- contents
- front matter
- preface
- acknowledgments
- about this book
- Who should read this book
- How this book is organized: A road map
- About the code
- liveBook discussion forum
- about the author
- about the cover illustration
- Part 1 Getting started
- 1 Web APIs at a glance
- 1.1 Web APIs
- 1.1.1 Overview
- 1.1.2 Real-world example
- 1.1.3 Types of web APIs
- 1.1.4 Architectures and message protocols
- 1.2 ASP.NET Core
- 1.2.1 Architecture
- 1.2.2 Program.cs
- 1.2.3 Controllers
- 1.2.4 Minimal APIs
- 1.2.5 Task-based asynchronous pattern
- Summary
- 2 Our first web API project
- 2.1 System requirements
- 2.1.1 .NET SDK
- 2.1.2 Integrated development environment
- 2.2 Installing Visual Studio
- 2.3 Creating the web API project
- 2.4 MyBGList project overview
- 2.4.1 Reviewing launchSettings.json
- 2.4.2 Configuring the appsettings.json
- 2.4.3 Playing with the Program.cs file
- 2.4.4 Inspecting the WeatherForecastController
- 2.4.5 Adding the BoardGameController
- 2.5 Exercises
- 2.5.1 launchSettings.json
- 2.5.2 appsettings.json
- 2.5.3 Program.cs
- 2.5.4 BoardGame.cs
- 2.5.5 BoardGameControllers.cs
- Summary
- 3 RESTful principles and guidelines
- 3.1 REST guiding constraints
- 3.1.1 Client-server approach
- 3.1.2 Statelessness
- 3.1.3 Cacheability
- 3.1.4 Layered system
- 3.1.5 Code on demand
- 3.1.6 Uniform interface
- 3.2 API documentation
- 3.2.1 Introducing OpenAPI
- 3.2.2 ASP.NET Core components
- 3.3 API versioning
- 3.3.1 Understanding versioning
- 3.3.2 Should we really use versions?
- 3.3.3 Implementing versioning
- 3.4 Exercises
- 3.4.1 CORS
- 3.4.2 Client-side caching
- 3.4.3 COD
- 3.4.4 API documentation and versioning
- Summary
- Part 2 Basic concepts
- 4 Working with data
- 4.1 Choosing a database
- 4.1.1 Comparing SQL and NoSQL
- 4.1.2 Making a choice
- 4.2 Creating the database
- 4.2.1 Obtaining the CSV file
- 4.2.2 Installing SQL Server
- 4.2.3 Installing SSMS or ADS
- 4.2.4 Adding a new database
- 4.3 EF Core
- 4.3.1 Reasons to use an ORM
- 4.3.2 Setting up EF Core
- 4.3.3 Creating the DbContext
- 4.3.4 Setting up the DbContext
- 4.3.5 Creating the database structure
- 4.4 Exercises
- 4.4.1 Additional fields
- 4.4.2 One-to-many relationship
- 4.4.3 Many-to-many relationship
- 4.4.4 Creating a new migration
- 4.4.5 Applying the new migration
- 4.4.6 Reverting to a previous migration
- Summary
- 5 CRUD operations
- 5.1 Introducing LINQ
- 5.1.1 Query syntax vs. method syntax
- 5.1.2 Lambda expressions
- 5.1.3 The IQueryable interface
- 5.2 Injecting the DbContext
- 5.2.1 The sync and async methods
- 5.2.2 Testing the ApplicationDbContext
- 5.3 Seeding the database
- 5.3.1 Setting up the CSV file
- 5.3.2 Installing the CsvHelper package
- 5.3.3 Creating the BggRecord class
- 5.3.4 Adding the SeedController