When I issue an update query or another Data Manipulation Language (DML) query that changes the data in the database, using Entity Framework 4, how do I see the query sent to the SQL Server?
Let’s say I do something like:
someEntityObjectInstance.SomeProperty = newValue;
context.SaveChanges();
In this case, there’s no ObjectQuery to do a ToTraceString() against, so I can’t really see what’s going on under the covers. I believe there’s some Microsoft SQL Server tool like the profiler or something that will help me see the query.
Also, some Intellitrace in VS 2010 Ultimate does the same thing, I think?
Can you please teach me how to use the SQL 2005 Profiler, if there’s any such thing?
Update
I am looking at a trace in SQL Server 2005 Profiler now but when I issue a context.DeleteObject() call or when I update an object and call context.SaveChanges(), I do not see the UPDATE or DELETE queries in the profiler. I only see wierd SELECT queries.
you answered it, sql server tool called profiler
edit:
http://msdn.microsoft.com/en-us/library/ms187929.aspx