Viewing Delete Sql Before Execution |
By Joseph Albahari, Ben Albahari
Price: $49.99 USD
£30.99 GBP
Cover | Table of Contents | Forum
![]() ![]() |
Viewing Delete Sql Before Execution |
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 ))?
|
|
|
|
Mar 26 2008, 10:32 AM
Post
#2
|
|
|
Active Member ![]() ![]() Group: Members Posts: 20 Joined: 16-February 08 Member No.: 90 |
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 |
|
|
|
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). |
|
|
|
![]() ![]() |
|
Lo-Fi Version | Time is now: 16th May 2008 - 11:01 AM |