Add shared pagination, projections and ownership helpers; simplify query and command handlers
This commit is contained in:
@@ -2,13 +2,12 @@ using Mediator;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Musify.Application.Contracts;
|
||||
using Musify.Domain.ValueObjects;
|
||||
using Musify.Application.Genres.Responses;
|
||||
|
||||
namespace Musify.Application.Genres;
|
||||
|
||||
public record GetGenresQuery : IQuery<IReadOnlyList<GenreResponse>>;
|
||||
|
||||
public record GenreResponse(Genre Genre, int TrackCount);
|
||||
|
||||
public class GetGenresQueryHandler(IDatabase database)
|
||||
: IQueryHandler<GetGenresQuery, IReadOnlyList<GenreResponse>>
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user