public DeliveryMode(Guid id, DeliveryKind kind, Producer producer, bool available, DeliveryAddress address, IEnumerable <DeliveryHours> openingHours, string name, string description = null) { Id = id; Kind = kind; Description = description; Address = address; Producer = producer; ProducerId = producer.Id; Closings = new List <DeliveryClosing>(); DeliveryHours = new List <DeliveryHours>(); SetName(name); SetDeliveryHours(openingHours); SetAvailability(available); DomainEvents = new List <DomainEvent>(); }
public void SetAddress(string line1, string line2, string zipcode, string city, CountryIsoCode country, double?longitude = null, double?latitude = null) { Address = new DeliveryAddress(line1, line2, zipcode, city, country, longitude, latitude); }