更新时间:2023-01-29 16:37:16
的(感谢约翰语法修复)的
所以我想通了。这是你必须做的:
So I figured it out. This is what you have to do:
db.Models.Order order = DB.Models.Order.CreateOrder( apple );
order.Customer = (from c in db.Customer where c.Id == custId select c).First();
db.SaveChanges();
我希望帮助的人。
I hope that helps people.