mirror of
https://github.com/aaronpo97/the-biergarten-app.git
synced 2026-10-15 01:54:43 +00:00
refactor(database): update seed pipeline to use dapper (#277)
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
using Features.Locations.Dtos;
|
||||
using Features.Locations.Repository;
|
||||
using MediatR;
|
||||
|
||||
namespace Features.Locations.Queries.GetAllCities;
|
||||
|
||||
public class GetAllCitiesHandler(ILocationRepository repository)
|
||||
: IRequestHandler<GetAllCitiesQuery, IEnumerable<CityDto>>
|
||||
{
|
||||
public Task<IEnumerable<CityDto>> Handle(
|
||||
GetAllCitiesQuery request,
|
||||
CancellationToken cancellationToken
|
||||
) => repository.GetAllCitiesAsync(request.Limit, request.Offset);
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
using Features.Locations.Dtos;
|
||||
using MediatR;
|
||||
|
||||
namespace Features.Locations.Queries.GetAllCities;
|
||||
|
||||
public record GetAllCitiesQuery(int? Limit, int? Offset) : IRequest<IEnumerable<CityDto>>;
|
||||
Reference in New Issue
Block a user