Exemplo n.º 1
0
 public ApartmentDTO(vacationApartment vacationApartment)
 {
     this.id                    = vacationApartment.id;
     this.name                  = vacationApartment.name;
     this.homeownerId           = vacationApartment.homeownerId;
     this.city                  = vacationApartment.city;
     this.street                = vacationApartment.street;
     this.buildingNumber        = vacationApartment.houseNumber;
     this.neighborhood          = vacationApartment.neighborhood;
     this.zipCode               = vacationApartment.postalCode;
     this.floor                 = vacationApartment.floor;
     this.amountOfRooms         = vacationApartment.amountOfRooms;
     this.beds                  = vacationApartment.beds;
     this.aSynagogueNearby      = vacationApartment.aSynagogueNearby;
     this.eruvAnTheNeighborhood = vacationApartment.eruvAnTheNeighborhood;
     this.yard                  = vacationApartment.yard;
     this.pool                  = vacationApartment.pool;
     this.jacuzzi               = vacationApartment.jacuzzi;
     this.weekendPrice          = vacationApartment.weekendPrice;
     this.pricePerNight         = vacationApartment.pricePerNight;
     this.priceForSaturdayNight = vacationApartment.priceForSaturdayNight;
     this.moreDetails           = vacationApartment.moreDetails;
     this.picture               = vacationApartment.img;
 }
Exemplo n.º 2
0
 public vacationApartment InsertVacationApartment(vacationApartment vacationApartment)
 {
     db.vacationApartment.Add(vacationApartment);
     db.SaveChanges();
     return(db.vacationApartment.FirstOrDefault(x => x.id == vacationApartment.id));
 }