refactor(database): update seed pipeline to use dapper (#277)

This commit is contained in:
Aaron Po
2026-09-05 00:37:14 -04:00
committed by GitHub
parent 78ad32e93a
commit d9411eb00e
43 changed files with 1023 additions and 735 deletions

View File

@@ -0,0 +1,5 @@
using MediatR;
namespace Features.Locations.Commands.CreateCountry;
public record CreateCountryCommand(string CountryName, string IsoCode) : IRequest<Guid>;

View File

@@ -0,0 +1,11 @@
using Features.Locations.Repository;
using MediatR;
namespace Features.Locations.Commands.CreateCountry;
public class CreateCountryHandler(ILocationRepository repository)
: IRequestHandler<CreateCountryCommand, Guid>
{
public Task<Guid> Handle(CreateCountryCommand request, CancellationToken cancellationToken) =>
repository.CreateCountryAsync(request.CountryName, request.IsoCode);
}