Q: Entity Framework Many-To-Many with additional field on Joining Table I have an entity context that includes three tables. The first is a table that contain products, the second contains recipes. The joining table has fields for IDs in both the products and recipes table as well as a 'bit' field called 'featured'. 
I've searched and found no example on how to insert only how to select against this type of scenario.Does anyone have any suggestions on how this can be done? Thanks in advance for any help.

A: I didn't do C# for a while, so I am not sure my syntax is valid, anyway this should be the idea:
Products product = new Products { Blah, Blah, Blah };

bool flag = false;
for (int i = 0; i < 5; i++)
{
    Products_Receipes pr = new Products_Receipes 
                                  { Products = product, IsFeatued = flag };
    pr.Receipes.Add(new Receipes()); 
    pr.Receipes.Add(new Receipes());
    flag = !flag;
}
Context.SaveChanges();

And if the above doesn't work, then let me just tell you that you have to create the main item (either Products or Receipes), then when you create the Products_Receipes set it's Products/Receipes property to the above (or by Products.Pruducts_Receipes.Add(pr)), then add the other side of the relation the same way.

A: An observation is that your diagram is structured more like a DB schema than an entity diagram. Entities should be designed to meet the business needs independent of the data storage structure so you can use any DB to store the data.
I believe you can remove the "Link" entity and set up a one-to-many or many-to-many associations between Products and Recipes. Then setup your DB schema w/ the link table and do the Table Mapping accordingly.
