December 2019
Intermediate to advanced
510 pages
11h 33m
English
The Catalog.Domain project is now capable of handling requests related to the Artist and Genre entities through the logic we implemented in the IArtistService and IGenreService classes. Therefore, we can proceed by creating the controller layer to handle the incoming HTTP requests. Since we have different separate entities, we are going to implement the ArtistController and GenreController controller classes. Let's first focus on ArtistController:
using Catalog.API.Filters;using Catalog.Domain.Services;using Microsoft.AspNetCore.Mvc;namespace Catalog.API.Controllers{ [Route("api/artist")] [ApiController] [JsonException] public class ArtistController : ControllerBase { private readonly IArtistService _artistService ...