protected override void ProcessImpl(User user) { var service = new TaxaService(user); // First we need to delete all of the existing regions... service.DeleteAllBiotaDistribution(Model.TaxaID); // Then insert the ones from the model... var list = new List <DistributionViewModel>(); foreach (HierarchicalViewModelBase b in _regionTree) { b.Traverse((m) => { if (m is DistributionViewModel) { list.Add(m as DistributionViewModel); } }); } foreach (DistributionViewModel dvm in list) { service.InsertBiotaDist(Model.TaxaID, dvm.Model); } }