mirror of
https://github.com/aaronpo97/the-biergarten-app.git
synced 2026-10-14 17:54:42 +00:00
19 lines
526 B
C#
19 lines
526 B
C#
using Features.Locations.Repository;
|
|
using MediatR;
|
|
|
|
namespace Features.Locations.Commands.CreateStateProvince;
|
|
|
|
public class CreateStateProvinceHandler(ILocationRepository repository)
|
|
: IRequestHandler<CreateStateProvinceCommand, Guid>
|
|
{
|
|
public Task<Guid> Handle(
|
|
CreateStateProvinceCommand request,
|
|
CancellationToken cancellationToken
|
|
) =>
|
|
repository.CreateStateProvinceAsync(
|
|
request.StateProvinceName,
|
|
request.IsoCode,
|
|
request.CountryId
|
|
);
|
|
}
|