mirror of
https://github.com/aaronpo97/the-biergarten-app.git
synced 2026-10-14 17:54:42 +00:00
12 lines
393 B
C#
12 lines
393 B
C#
using Features.Locations.Repository;
|
|
using MediatR;
|
|
|
|
namespace Features.Locations.Commands.CreateCity;
|
|
|
|
public class CreateCityHandler(ILocationRepository repository)
|
|
: IRequestHandler<CreateCityCommand, Guid>
|
|
{
|
|
public Task<Guid> Handle(CreateCityCommand request, CancellationToken cancellationToken) =>
|
|
repository.CreateCityAsync(request.CityName, request.StateProvinceId);
|
|
}
|