Guest User

Untitled

a guest
Aug 15th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. Model-view-viemodel pattern
  2. public class TaxGroupDataModel : DataModel
  3. {
  4. private readonly TaxGroup _taxGroup;
  5. private readonly IEnumerable<TaxSubGroup> _taxSubGroups;
  6.  
  7. public TaxGroupDataModel(TaxGroup taxGroup)
  8. {
  9. if (taxGroup == null) { throw new ArgumentNullException("taxGroup"); }
  10.  
  11.  
  12. _taxGroup = taxGroup;
  13. _taxSubGroups = taxGroup.SubGroups;
  14. }
  15.  
  16. public IEnumerable<TaxSubGroup> TaxSubGroups { get { return _taxSubGroups; } }
  17.  
  18. public TaxGroup TaxGroup { get { return _taxGroup; } }
  19. }
Add Comment
Please, Sign In to add comment