Example #1
0
 //TODO: See how we can avoid injecting EventBus into the Domain entities
 public Site(Guid id, int siteNumber, string siteName, SiteStatus status, SiteFacilityType siteFacitlityType, SiteType siteType,
     DateTimeRange contractDuration, PhoneNumber primaryPhoneNumber, Contact contactDetails, VO.Address address, string email,
     string countyCode, string countyServedCode, LicenceStatus licenceStatus, IEnumerable<SiteHoliday> holidays, IEnumerable<SiteRate> rates/*, IBus bus*/)
     : base(id/*, bus*/)
 {
     SiteNumber = siteNumber;
     SiteName = siteName;
     Status = status;
     SiteFacitlityType = siteFacitlityType;
     SiteType = siteType;
     ContractDuration = contractDuration;
     PrimaryPhoneNumber = primaryPhoneNumber;
     ContactDetails = contactDetails;
     Address = address;
     Email = email;
     CountyCode = countyCode;
     CountyServedCode = countyServedCode;
     LicencingStatus = licenceStatus;
     InitializeDbState();
     holidays.ForEach(AddNewHoliday);
     rates.ForEach(AddNewSiteRate);
 }
Example #2
0
 public Site(int siteId, string siteName, SiteStatus status, SiteFacilityType siteFacitlityType, SiteType siteType,
     DateTimeRange contractDuration, PhoneNumber primaryPhoneNumber, Contact contactDetails, VO.Address address, string email,
     string county, string countyServed, LicenceStatus licenceStatus, IEnumerable<SiteHoliday> holidays, IEnumerable<SiteRate> rates/*, IBus eventBus*/)
     : this(GuidHelper.NewSequentialGuid(), siteId, siteName, status, siteFacitlityType, siteType, contractDuration, primaryPhoneNumber, contactDetails, address, email, county, countyServed, licenceStatus, holidays, rates/*, eventBus*/)
 {
 }