Extending the data access layer

In order to extend our APIs with the related entities, we should start from the bottom of our stack. First of all, let's spread the capabilities of the data access layer by adding the following interfaces in the Repositories folder of the Catalog.Domain project:

// Repositories/IArtistsRepository.csusing System;using System.Collections.Generic;using System.Threading.Tasks;using Catalog.Domain.Entities;namespace Catalog.Domain.Repositories{    public interface IArtistRepository : IRepository    {        Task<IEnumerable<Artist>> GetAsync();        Task<Artist> GetAsync(Guid id);        Artist Add(Artist item);    }}// Repositories/IGenreRepository.csusing System;using System.Collections.Generic;using System.Threading.Tasks;using Catalog.Domain.Entities; ...

Get Hands-On RESTful Web Services with ASP.NET Core 3 now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.