BusinessObject.cs 669 B

123456789101112131415161718192021222324252627282930313233
  1. using System.Collections.Generic;
  2. namespace DataSources
  3. {
  4. public class Category
  5. {
  6. public string Name { get; }
  7. public string Description { get; }
  8. public List<Product> Products { get; }
  9. public Category(string name, string description)
  10. {
  11. Name = name;
  12. Description = description;
  13. Products = new List<Product>();
  14. }
  15. }
  16. public class Product
  17. {
  18. public string Name { get; }
  19. public decimal UnitPrice { get; }
  20. public Product(string name, decimal unitPrice)
  21. {
  22. Name = name;
  23. UnitPrice = unitPrice;
  24. }
  25. }
  26. }