title: Insert duplicate records in a weak entity Entity Framework
body: <p>So I'm doing some entity framework practices and as a project I wanted to create a database that stores a list of clients, some products and when and how many of a product where bought.</p>
  <p>I created an entity &quot;Receipt&quot;.</p>
  <pre><code>[Key]
  public int ID { get; set; }
  
  [Required]
  public DateTime RecieptDate { get; set; }
  
  [ForeignKey(&quot;FKClient&quot;)]
  public Client Client { get; set; }
  
  public List&lt;Product&gt; Products { get; set; }
  </code></pre>
  <p>And EF creates an implicit table in the Database to store the relationship between <code>Receipt</code> and <code>Products</code>, but the thing is that I want to store multiple records of the same product in the same receipt. I wonder is there a way to store duplicate records on the implicit <code>ReceiptProducts</code> table?</p>
  <p>If not, is there a better way to approach this problem?
  (Edit) -Added the product entity</p>
  <pre><code>class Product
      {
          [Key]
          public int ID { get; set; }
          [Required]
          public string name { get; set; }
          [Required]
          [Range(1,double.MaxValue)]
          public decimal price { get; set; }
          public List&lt;Receipt&gt; Receipts { get; set; }
      }
  </code></pre>