17 lines
486 B
C#
17 lines
486 B
C#
using MediatR;
|
|
using Modules.Library.Application.Gateways;
|
|
|
|
namespace Modules.Library.Application.Queries.Dictionaries.Genre;
|
|
|
|
public class GenreListQuery : IRequest<List<Models.Genre>>
|
|
{
|
|
|
|
}
|
|
|
|
public class GenreListQueryHandler(IGenreGateway genreGateway) : IRequestHandler<GenreListQuery, List<Models.Genre>>
|
|
{
|
|
public async Task<List<Models.Genre>> Handle(GenreListQuery request, CancellationToken cancellationToken)
|
|
{
|
|
return await genreGateway.GetList();
|
|
}
|
|
} |