public RegisterNewParkingSpaceCommand(
     string ownerId,
     ParkingSpaceDescription description,
     Address address,
     SpaceAvailability availability,
     BookingRate bookingRate)
 {
     OwnerId      = ownerId;
     Description  = description;
     Address      = address;
     Availability = availability;
     BookingRate  = bookingRate;
 }
        RegisterNewParkingSpaceCommand BuildParkingSpaceCommand(CreateParkingSpaceDTO dto)
        {
            return(new RegisterNewParkingSpaceCommand("test"
                                                      , //User.FindFirst(ClaimTypes.NameIdentifier).ToString(),

                                                      new ParkingSpaceDescription(dto.Description.Title,
                                                                                  dto.Description.Description, dto.Description.ImageFile.FileName),

                                                      new Address(dto.Address.Street, dto.Address.City, dto.Address.State,
                                                                  dto.Address.Zip, new Point(dto.Address.Latitude, dto.Address.Longitude)),

                                                      SpaceAvailability.Create247Availability(),
                                                      new BookingRate(
                                                          new Money(dto.BookingRate.HourlyRate),
                                                          new Money(dto.BookingRate.DailyRate))));
        }
예제 #3
0
 public static SpaceAvailability GetTestAvailability()
 {
     return(SpaceAvailability.Create247Availability());
 }