LINQ to Entities how to update a record

后端 未结 4 1045
粉色の甜心
粉色の甜心 2021-02-01 01:58

Okay, so I\'m new to both EF and LINQ. I have figured out how to INSERT and DELETE but for some reason UPDATE seems to escape my grasp.

Here is a sample of my code:

4条回答
  •  礼貌的吻别
    2021-02-01 02:38

    They both track your changes to the collection, just call the SaveChanges() method that should update the DB.

提交回复
热议问题