如何将参数添加到以下实体框架原始 SQL 命令?例如,如果我想制作Id
a 参数怎么办?
using (var context = new NorthwindDBEntities())
{
context.Database.ExecuteSqlCommand(@"
UPDATE dbo.Customers
SET Name = 'Test' WHERE Id = 1
");
}