Inserting multiple rows into a table using Entity Framework

前端 未结 3 662
[愿得一人]
[愿得一人] 2021-01-20 08:15

I’m having fun with EF and have come unstuck.

Originally I used the following bit of code using standard linq that essentially enters some data into a table.

3条回答
  •  轮回少年
    2021-01-20 08:42

    Try the following code:

    
    manPref.tblManagePreference.Add(prefMemberID);
    manPref.tblManagePreference.Add(prefLocationID);
    manPref.SaveChanges();
    

提交回复
热议问题