C# 3.0 in a Nutshell
C# 3.0 in a Nutshell, Third Edition A Desktop Quick Reference

By Joseph Albahari, Ben Albahari
Price: $49.99 USD
£30.99 GBP

Cover | Table of Contents | Forum


Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
Viewing Delete Sql Before Execution
Terry Aney
post Mar 26 2008, 05:21 AM
Post #1


Active Member
**

Group: Members
Posts: 10
Joined: 25-March 08
Member No.: 169



Is there any way to view what transact DELETE statements will be issued before calling SubmitChanges() (i.e. if you've used [Table].DeleteAllOnSubmit( IEnumerable ))?
Go to the top of the page
 
+Quote Post
Joseph Albahari
post Mar 26 2008, 10:32 AM
Post #2


Active Member
**

Group: Members
Posts: 20
Joined: 16-February 08
Member No.: 90



QUOTE (Terry Aney @ Mar 26 2008, 02:21 PM) *
Is there any way to view what transact DELETE statements will be issued before calling SubmitChanges() (i.e. if you've used [Table].DeleteAllOnSubmit( IEnumerable ))?


You could call .Dump on the (IEnumerable) sequence first.

Does that answer your question?

Joe
Go to the top of the page
 
+Quote Post
Terry Aney
post Mar 26 2008, 08:31 PM
Post #3


Active Member
**

Group: Members
Posts: 10
Joined: 25-March 08
Member No.: 169



Not really. I guess I'm just being paranoid and want to see the actual 'delete sql' statements. It's becoming less of an issue, but until I'm 100% confident/fluent in my LINQ skills, I'd like to see the actual sql it'll execute on an update/delete.

On the DataContext, there is GetChangeSet() and from there .Deletes / .Inserts / .Updates which lists them again only in IEnumerable. I guess I could view those, but again, just as a migration sanity check from SQL to LINQ I was hoping to see generated SQL (kind of like LINQ Debug Visualizer in Visual Studio).
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

RSS Lo-Fi Version Time is now: 16th May 2008 - 11:01 AM