API Development in ASP.NET Core

Paths

API Development in ASP.NET Core

Authors: Kevin Dockx, Roland Guijt

APIs are at the heart of today's connected applications. ASP.NET Core offers a multitude of choices for developing APIs. This path will help you learn about all of the choices,... Read more

What you will learn

  • REST principals
  • Building RESTful APIs using ASP.NET Core
  • Documenting APIs with OpenAPI/Swagger
  • Designing and building asynchronous APIs
  • Creating GraphQL APIs in ASP.NET Core

Pre-requisites

Knowledge of C# and ASP.NET Core MVC

Beginner

APIs are one of the most important building blocks of modern applications, and in this section, you will learn everything you need to know to build a successful RESTful API in ASP.NET Core.

Building a RESTful API with ASP.NET Core

by Kevin Dockx

Nov 15, 2017 / 8h 10m

8h 10m

Start Course
Description

Hello! My name is Kevin Dockx, and welcome to Building Your First API with ASP.NET Core. In this course, you will learn how to build an API with ASP.NET Core that connects to a database via Entity Framework Core. You will get there by covering major topics like getting resources from services and manipulating them, the built-in dependency injection system & logger, working with different environments, configuration files and middleware, and Entity Framework Core related features like working with migrations and seeding the database. By the end of this course, you will be able to build an API from scratch with ASP.NET Core. Before you begin, make sure you are already familiar with C#. I hope you’ll join me, and I look forward to helping you on your learning journey here at Pluralsight.

Table of contents
  1. Course Overview
  2. Introducing REST
  3. Getting Resources
  4. Creating and Deleting Resources
  5. Updating Resources
  6. Working with Validation and Logging
  7. Implementing Paging, Filtering, and Searching
  8. Implementing Sorting and Data Shaping
  9. Getting Started with HATEOAS
  10. Advanced HATEOAS, Media Types, and Versioning
  11. Working with Caching and Concurrency
  12. Protecting, Testing, and Documenting Our API

Intermediate

Learn how to document your API for other developers with the course on OpenAPI/Swagger in this section. Then, learn how you can make sure your API is using asynchronous methods when you building your API.

Documenting an ASP.NET Core API with OpenAPI / Swagger

by Kevin Dockx

Feb 27, 2019 / 2h 51m

2h 51m

Start Course
Description

Documenting an API is often regarded as a tedious yet essential task. By using OpenAPI / Swagger, which integrates nicely with ASP.NET Core, you can take on this task. In this course, Documenting an ASP.NET Core API with OpenAPI / Swagger, you will gain the ability to document your API. First, you will learn how to add documentation for your API and add a UI that allows testing the API. Next, you will discover how to use attributes and conventions to improve the generated OpenAPI specification. Finally, you will explore how to deal with authentication, versioning and UI customization. When you are finished with this course, you will have the skills and knowledge of OpenAPI needed to correctly document your ASP.NET Core API.

Table of contents
  1. Course Overview
  2. Getting Started with OpenAPI / Swagger
  3. Documenting Your First API with OpenAPI / Swagger
  4. Using and Overriding Conventions for OpenAPI Generation
  5. Dealing with Different Versions and Protecting the Documentation
  6. Improving Your Documentation with Advanced Customization
  7. Generating OpenAPI Specifications for Advanced Input and Output Scenarios

Building an Async API with ASP.NET Core

by Kevin Dockx

Aug 14, 2018 / 2h 42m

2h 42m

Start Course
Description

Coding an asynchronous API comes with its own set of challenges. In this course, Building an Async API with ASP.NET Core, you will gain the ability to increase the scalability and performance of your API by writing async code. First, you will learn how asynchronous code actually works and what the advantages can be. Next, you will discover how to consume an EF Core data store asynchronously, how to expose that data via an API, and how to call into a service asynchronously. Finally, you will explore how to avoid common pitfalls when writing async code. When you’re finished with this course, you will have the skills and knowledge of asynchronous code needed to build a fully async API with ASP.NET Core.

Table of contents
  1. Course Overview
  2. Understanding the Power of Async
  3. Starting at the Bottom with Your Data Access Layer
  4. Asynchronously Reading Resources
  5. Asynchronously Manipulating Resources
  6. Understanding How to Integrate with External Services Using Async
  7. Avoiding Common Pitfalls

Using OpenAPI/Swagger for Testing and Code Generation in ASP.NET Core

by Kevin Dockx

Apr 12, 2019 / 1h 21m

1h 21m

Start Course
Description

Testing an API improves its reliability. Generating client-side code helps with getting started fast when building a client that consumes your API. OpenAPI can help with both. In this course, Using OpenAPI/Swagger for Testing and Code Generation in ASP.NET Core, you will gain the ability to test an API and generate code from it. First, you will learn what OpenAPI (Swagger) is. Next, you will discover how it can help with code generation. Finally, you will explore how to test your API, from manual to automated and command-line testing. When you’re finished with this course, you will have the skills and knowledge of .NET Core and OpenAPI needed to test your API and generate client-side code from it.

Table of contents
  1. Course Overview
  2. Getting Started with OpenAPI/Swagger
  3. Generating Client-side Code from an OpenAPI Specification
  4. Using OpenAPI to Test an API

Advanced

GraphQL is an exciting new alternative to RESTful APIs, and in this section, you will learn how you can build GraphQL APIs in ASP.NET Core.

Building GraphQL APIs with ASP.NET Core

by Roland Guijt

Jan 17, 2019 / 1h 23m

1h 23m

Start Course
Description

Having an API that doesn't use REST, and contains just one endpoint which has the ability to return data in a form that exactly suits the data-consuming application is very powerful. After watching this practical course, Building GraphQL APIs with ASP.NET Core, you’ll be ready to implement GraphQL in your ASP.NET Core API and write queries against it. First, you will explore how using GraphQL has lots of benefits compared to REST or SOAP. Next, you will very quickly understand the basic principles of GraphQL and shortly after, you can start building your own GraphQL endpoint in ASP.NET Core. Finally, you will discover how schemas provide metadata to clients, how queries are written for data retrieval and mutations. By the end of this course, you will be amazed by the ability that your GraphQL endpoint has to actively contact the client when changes occur with subscriptions.

Table of contents
  1. Course Overview
  2. Starting with GraphQL
  3. Creating a GraphQL API
  4. Consuming a GraphQL API
  5. Mutating Data with GraphQL
  6. Working with Subscriptions