title: Set of products with different types of products and quantity in C# / Entity Framework
body: <p>I am kinda new in C# and Entity Framework and trying to make a simple warehouse management system just for training. The problem is I don't know how to make sets of products to work.</p>
  <p>I have classes like this:</p>
  <pre><code>public class Product
  {
      public int Id { get; set; }
      public string Name { get; set; }
      public string Signature { get; set; }
      public int Stock { get; set; }
  }
  
  public class SetOfProducts
  {
      public int Id { get; set; }
      public string Sku { get; set; }
      // Here should be some lines of code that I don't know
  }
  </code></pre>
  <p>What I am trying to do is:</p>
  <ul>
  <li>Create set of e.g. 3 products: ProductX, ProductY, ProductZ, but these can be with different quantity e.g 2pcs ProductX, 4pcs ProductY,  1pc ProductZ</li>
  <li>Also #1 I will never know how many types of products and their pieces will be in set, so I can't hardcode</li>
  <li>Also #2 When I take off Set of products from stock it should decrease available amount of those type of products from main table of Products.</li>
  </ul>
  <p>I've made a lot of searching and only find something called &quot;table association&quot;, but without any understandable for me details.</p>
  <p>I hope I explained this enough. Please help :P</p>