Ejemplo n.º 1
0
            public async Task <string> Handle(CreateServiceOccasionForCarCommand request, CancellationToken cancellationToken)
            {
                var serviceOccasion = new Domain.ServiceOccasion
                {
                    Mileage      = request.Data.Mileage,
                    CreationTime = request.Data.DateTime,
                    Type         = mapper.Map <Domain.ServiceType>(request.Data.Type),
                };
                var serviceOccasionId = await serviceOccasionsStore.AddServiceOccasionForCar(request.FleetId, request.CarId, serviceOccasion, cancellationToken);

                return(serviceOccasionId);
            }