예제 #1
0
 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
     });
 }
예제 #2
0
 internal void AddPerson(Person person, Estate estate)
 {
     personsByEstatesList.Add(PersonsByEstate.Create(person, estate));
 }
예제 #3
0
 private Estate(IEnumerable <Person> Owners) : this()
 {
     personsByEstatesList = Owners.Select(x => PersonsByEstate.Create(x, this)).ToList();
 }