protected override void SaveExtended(Tenant entity) { DalPartner partnerDal = new DalPartner(this.storageAccount, this.container); //save tenant partner partnerDal.Save(entity.TenantPartner as Partner); //save trading partners foreach (Partner tradingPartner in entity.TradingPartners) { partnerDal.Save(tradingPartner); } }
protected override Tenant GetExtended(Tenant entity) { DalPartner partnerDal = new DalPartner(this.storageAccount, this.container); entity.TenantPartner = partnerDal.Get(entity.TenantPartnerIdentifier); foreach (string tradingPartnerIdentifier in entity.TradingPartnersIdentifiers) { entity.TradingPartners.Add(partnerDal.Get(tradingPartnerIdentifier)); } return(entity); }