December 2019
Intermediate to advanced
510 pages
11h 33m
English
To get HATEOAS working, we will rely on a third-party NuGet package called RiskFirst.Hateoas. This package allows us to integrate the HATEOAS principle in our service efficiently. First of all, let's proceed by adding the package to Catalog.API by executing the following command in both project folders:
dotnet add package RiskFirst.Hateoas
Next, create a new entity called the ItemHateoasResponse class, which represents the HATEOAS response. This class refers to the already implemented ItemResponse class, and it implements the ILinkContainer interface exposed by the RiskFirst.Hateoas package:
using System.Collections.Generic;using Newtonsoft.Json;using RiskFirst.Hateoas.Models;using Catalog.Domain.Responses ...
Read now
Unlock full access