Domain Driven Design, Dotnet, Csharp, Refactoring, Software Development.
return Result.Failure(DomainErrors.Flight.InvalidPassengerCount); } // Business logic var flight = await _flightRepository.GetFlightByIdAsync(command.FlightId); if (flight == null) { return Result.Failure(DomainErrors.Flight.FlightNotFound); } if (flight.AvailableSeats < command.PassengerCount) {