У меня есть следующая таблица:
![enter image description here](https://i.stack.imgur.com/yaA7X.png)
Я хочу обновить ApproveStatus
строк с RequestId=2
, где goodsId = 4
отклонено и goodsId=1
одобрен.
Мой вопрос заключается в том, как сделать это, используя Entity Framework Core в ASP. NET Core 2.2.
Это то, что я сделал до сих пор:
// model contain "approve" and "reject" strings and requestId which came from view
public IActionResult ApproveList(List<ApprovedGoodsByAdminAssistVM> model)
{
// I got the requestId from model
var id = model.Select(s => s.RequestId).FirstOrDefault();
// Filtered the two record with RequestId=2 from the table
var goodsList = context.RequestGoodsBrand
.Where(x => x.RequestId == id).ToList();
}
Что делать дальше?
Заранее спасибо