tags:

views:

57

answers:

0

Hello

L2S is throwing me back an exception from my database when I try to run a command. Unfortunately I can't see the SQL that is running no matter what I do.

I set the DataContext.Log to Console.Out -> nothing in my Debug window, or even when I run DebugView.

I try to get it to write to a file - nothing.

I try SQL Profiler - apparently this runs under Stored Procs - again, nothing.

I'm running this under NUnit, could that be interfering?

Any ideas welcome folks, hit a brick wall with this one!

It was definitely running the query, the exception was a Foreign Key constraint on one of the tables.

By running the unit tests via ReSharper, I got the SQL output. However for some reason it still doesn't appear in the Output|Debug window.

PS This is in relation to this q - http://stackoverflow.com/questions/1228367/linq-to-sql-insert-object-with-child-list

Thanks Duncan