Example #1
0
 /// <summary>
 ///     Resolves the dependencies by means of persisting all models that this model is referencing.
 /// </summary>
 protected override void ResolveGeneratedDependency()
 {
     base.ResolveGeneratedDependency();
     if (_principal != null)
     {
         _principal.Save();
         this.ModifiedData.PrincipalId = _principal.Id;
     }
 }
Example #2
0
 /// <summary>
 ///     Resolves the dependencies by means of persisting all models that this model is referencing.
 /// </summary>
 protected override void ResolveGeneratedDependency()
 {
     base.ResolveGeneratedDependency();
     if (_principal != null)
     {
         _principal.Save();
         this.ModifiedData.PrincipalId = _principal.Id;
     }
     if (_person != null)
     {
         _person.Save();
         this.ModifiedData.PersonId = _person.Id == null && this.ModifiedData.PersonId != null ? "" : _person.Id;
     }
     if (_sellingCompany != null)
     {
         _sellingCompany.Save();
         this.ModifiedData.SelcoId = _sellingCompany.Id == null && this.ModifiedData.SelcoId != null ? "" : _sellingCompany.Id;
     }
     if (_reportId != null)
     {
         _reportId.Save();
         this.ModifiedData.RepId = _reportId.Id == null && this.ModifiedData.RepId != null ? "" : _reportId.Id;
     }
 }