Beispiel #1
0
 public Offer(Period period, OwnerId ownerId, Apartment apartment, Price pricePerDay, OfferId offerId, Price deposit)
 {
     Id           = offerId;
     _period      = period;
     _ownerId     = ownerId;
     _apartment   = apartment;
     _pricePerDay = pricePerDay;
     _deposit     = deposit;
 }
        public static Offer Create(Apartment apartment, OwnerId ownerId, Period period, Price pricePerDay, Price deposit)
        {
            var offerId = OfferId.From(Guid.NewGuid().ToString());

            return(new Offer(period, ownerId, apartment, pricePerDay, offerId, deposit));
        }