Defining the service layer

After defining the User entity and the IUserRepository interface, we can proceed with the definition of the service layer in the Catalog.Domain project. Let's start by describing the IUserService interface:

using System.Threading;using System.Threading.Tasks;using Catalog.Domain.Repositories;using Catalog.Domain.Requests.User;using Catalog.Domain.Responses;namespace Catalog.Domain.Services{    public interface IUserService    {        Task<UserResponse> GetUserAsync(GetUserRequest request,             CancellationToken cancellationToken = default);        Task<UserResponse> SignUpAsync(SignUpRequest request,             CancellationToken cancellationToken = default);        Task<TokenResponse> SignInAsync(SignInRequest request,             CancellationToken cancellationToken ...

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

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.