开发者

How do I use LINQPad with third party plugins?

All documentation I can find relevant to doing updates with Linqpad mentions a "SubmitChanges" function which should be global for C# code and/or expressions. Nonetheless it doesn't work; all I can get is:

The name 'SubmitChanges' does not exist in the current context

This is attempting to u开发者_StackOverflowse LINQPad with Msoft CRM/Dynamics and the related plugin. Simple "Select" queries do work.


SubmitChanges is generally only required for 3rd party LINQ providers, such as LINQ to Entities, but not for LINQ to Objects - in that context it will save all the changes made to the underlying data store.

SubmitChanges() works on a unit of work such as a data context provided by the LINQ provider, but this doesn't exist for regular LINQ (since all changes are made in memory and don't have to be persisted anywhere).

From MSDN:

Computes the set of modified objects to be inserted, updated, or deleted, and executes the appropriate commands to implement the changes to the database.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜