public static Contract Create(PersonsByEstate personsByEstate, ContractType contractType, WaterMeter waterMeter, int initialMeterRead = 0, bool doubleBasicCharge = false, bool isActive = true) { return(new Contract() { PersonsByEstate = personsByEstate, ContractTypeId = contractType.Id, MeterId = waterMeter.Id, InitialMeterRead = initialMeterRead, DoubleBasicCharge = doubleBasicCharge, IsActive = isActive, EmissionDate = DateTime.Now }); }
internal void AddPerson(Person person, Estate estate) { personsByEstatesList.Add(PersonsByEstate.Create(person, estate)); }
private Estate(IEnumerable <Person> Owners) : this() { personsByEstatesList = Owners.Select(x => PersonsByEstate.Create(x, this)).ToList(); }