Question: what is the LINQ-to-Entity code to insert an order for a specific customer?
I don't get what the problem is, exactly.
var mycustomer = context.Customers.Where(x => x.id == 100).FirstOrDefault(); if(mycustomer != null) { mycustomer.Orders.Add(myorder); } context.SaveChanges();