public void PlanMaintenanceJob(PlanMaintenanceJob command) { // check business rules command.PlannedMaintenanceJobShouldFallWithinOneBusinessDay(); this.NumberOfParallelMaintenanceJobsMustNotExceedAvailableWorkStations(command); this.NumberOfParallelMaintenanceJobsOnAVehicleMustNotExceedOne(command); // handle event MaintenanceJobPlanned e = command.MapToMaintenanceJobPlanned(); RaiseEvent(e); }
public void PlanMaintenanceJob(PlanMaintenanceJob command) { // check business rules command.PlannedMaintenanceJobShouldFallWithinOneBusinessDay(); this.NumberOfParallelMaintenanceJobsMustNotExceedAvailableWorkStations(command); this.NumberOfParallelMaintenanceJobsOnAVehicleMustNotExceedOne(command); // handle event MaintenanceJobPlanned e = new MaintenanceJobPlanned(command.MessageId, command.StartTime, command.EndTime, command.CustomerInfo, command.VehicleInfo, command.Description); RaiseEvent(e); }