如何在LinqPad中提交更改 [英] How to submit changes in LinqPad
本文介绍了如何在LinqPad中提交更改的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在LinqPad中提交更改时遇到问题.我在LinqPad中通过IQ驱动程序使用Oracle数据库.我可以检索数据,但不知道如何将更改提交到数据库.
I have a problem with committing changes in LinqPad. I am using Oracle database over IQ driver in LinqPad. I can retrieve data but I don't know how to submit changes to database.
我从数据库中检索数据:
I retrieve data from database:
var items = Asyncqueue.Where(x => ids.Any(y=> y == x.Asyncqueueid));
// then I have to fix data
我试图将提交操作设置如下:
I have tried to set submit action like this:
Asyncqueue.SetSubmitAction(items, SubmitAction.Update);
推荐答案
将LINQPad中的语言更改为"C#程序"并使用以下代码
Change Language in LINQPad to "C# Program" and use the following code
void Main()
{
var p1 = Person.Single(x => x.Id == 1);
p1.Name = "Test";
SubmitChanges();
}
这篇关于如何在LinqPad中提交更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文