Exemplo n.º 1
0
 public IEnumerable<TaxonList> getTaxonSelections()
 {
     using (var ctx = new TaxonSelectionDataContext())
     {
         foreach (var list in ctx.TaxonLists)
             yield return list;
     }
 }
 private void withSelections(Action<TaxonSelectionDataContext> operation) {
     using (var ctx = new TaxonSelectionDataContext()) {
         operation(ctx);
     }
 }
 private IEnumerable<int> getUnusedTaxonTableIDs(TaxonSelectionDataContext ctx) {
     var usedTableIDs = from ts in ctx.TaxonLists
                        select ts.TableID;
     return TaxonList.ValidTableIDs.Except(usedTableIDs);
 }