Skip to main content
5 events
when toggle format what by license comment
Dec 19, 2018 at 16:43 comment added JsonStatham This will give you the SQL that was generated, where, in the output window? which option from the dropdown?
Feb 27, 2013 at 12:37 comment added springy76 @CarlG System.Data.Objects.ObjectQuery is not EF 4.1 (DbContext). Using DbContext it would be System.Data.Entity.Infrastructure.DbQuery`1[MyProject.Models.Product] which indeed outputs it's SQL on a call to "ToString()"
Nov 14, 2012 at 17:42 comment added Carl G This technique produces System.Data.Objects.ObjectQuery``1[MyProject.Models.Product] for me.
Sep 15, 2011 at 9:57 comment added Chad Levy Point of fact, I believe this only works when the query returns an anonymous type. If it returns a custom type, the ToString() output is the namespace of that custom type. For example, if the above code was select new CustomType { x = x.Name }, the returned value would be something like Company.Models.CustomType instead of the generated SQL.
Sep 1, 2011 at 8:48 history answered Capriols CC BY-SA 3.0