LINQpad:找不到全局函数SubmitChanges [英] LINQpad: Global function SubmitChanges not found
问题描述
我在LINQpad 4.0中有一个C#语句,如下所示:
I've got a C#-Statement in LINQpad 4.0 like this:
var x = (from y in MyTable
where y.ID == 12345
select y).Single();
x.PropA = "abc";
SubmitChanges();
执行语句时出现错误 名称"SubmitChanges"在当前上下文中不可用
When i execute the Statements i get the error The name "SubmitChanges" is not available in the current context
如何使用linqpad解决问题或更新我的数据? 在我的研究中,我发现了一些有关使用第二个数据上下文的东西,但是它应该与第一个上下文一起使用...
How can i fix the problem or update my data using linqpad? On my research i just found something about using a second datacontext, but it should work with the first context...
推荐答案
很可能您尚未设置数据库(连接).从查询上方的下拉列表中选择一个数据库,或将连接从左侧的Schema Explorer拖到您的查询上.
Most likely, you've not set a database (connection). Choose a database from the dropdown list above the query, or drag a connection from the Schema Explorer on the left onto your query.
这篇关于LINQpad:找不到全局函数SubmitChanges的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!