mirror of
https://github.com/aaronpo97/the-biergarten-app.git
synced 2026-10-14 17:54:42 +00:00
12 lines
403 B
C#
12 lines
403 B
C#
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);
|
|
}
|