Let's proceed with the concrete part of the chapter by implementing the service classes. This layer of abstraction will define the methods that query the data layer, including the IItemRepository interface, and map the resulting data.
As mentioned previously, our service implementation will use DTO classes in order to pass the data through the stack. First of all, let's define the request classes needed by our service. To do that, we can start by creating a new Requests/Item folder structure in the Catalog.Domain project, and by adding a new AddItemRequest.cs file in the folder:
using System;
using Catalog.Domain.Entities;
namespace Catalog.Domain.Requests.Item
{
public class AddItemRequest
{
public string Name { get; set; }
public string Description { get; set; }
public string LabelName { get; set; }
public...