【发布时间】:2013-12-28 00:46:41
【问题描述】:
我的情况很奇怪。我阅读了context.Configuration.AutoDetectChangesEnabled = false; 并决定使用它。
但我找不到它。代码是
using (DefaultCS db = new DefaultCS())
{
db.Configuration.AutoDetectChangesEnabled = false;
order.OrderTables = TableNo;
order.OrderMenus = oMenu;
db.Orders.AddObject(order);
db.SaveChanges();
}
我在db.Configuration 遇到错误,即ROS.DefaultCS does not contain a definition for 'Configuration' and no extension method 'Configuration' accepting a first argument of type 'ROS.DefaultCS' could be found (are you missing a using directive or an assembly reference?)
我错过了什么? 我正在使用 EF4。
【问题讨论】:
标签: asp.net entity-framework entity-framework-4