【发布时间】:2013-12-24 04:41:03
【问题描述】:
for (int i = 0; i < dataGridView1.Rows.Count; i++)
it = db.items.FirstOrDefault(p => p.rakmsanf == Convert.ToString(dataGridView1.Rows[i].Cells["Column2"].Value ));
{
it.quantity =(Convert .ToInt32 ( it.quantity )+Convert.ToInt32 ( dataGridView1.Rows[i].Cells["Column6"].Value)).ToString ();
}
尝试使用 column2 值更新
数量并使其=数量+column2值哪个项目名称=其他列中的其他值 我明白了
LINQ to Entities 无法识别方法 'System.String ToString(System.Object)' 方法,并且该方法无法转换为存储表达式"
【问题讨论】:
-
我试图格式化您的代码,但我认为您在放置大括号的位置有误。
标签: c# entity-framework datagridview linq-to-entities