Strange Issue: Everything looks fine, but no data returned (0 results)
I have installed first the release version, and afterwards the beta (4.43.06) of LINQPad, but I have experienced a very strange issue.
I am trying to access the data from my MVC 4 project using EF 5 and SQL Express 2012. I have added the connection by referencing my assembly and web.config. If I click "Test" it completes successfully. It also shows all the classes of my DbContext (except, some inherited classes, that don't show up? I'm using Table Per Concrete Type (TPC)?).
The strange thing is that when I try a query, even some of the simple standard ones (right-click options, Take 100 etc.), it shows it querying and then shortly after returns 0 results. (Yes, I am quite sure the database contains data - my application works fine with it, as does SSMS). If it wasn't for that rather important detail I'd swear it was working like it should. No errors anywhere, just no data either.
Any ideas?
Best regards,
Martin
I am trying to access the data from my MVC 4 project using EF 5 and SQL Express 2012. I have added the connection by referencing my assembly and web.config. If I click "Test" it completes successfully. It also shows all the classes of my DbContext (except, some inherited classes, that don't show up? I'm using Table Per Concrete Type (TPC)?).
The strange thing is that when I try a query, even some of the simple standard ones (right-click options, Take 100 etc.), it shows it querying and then shortly after returns 0 results. (Yes, I am quite sure the database contains data - my application works fine with it, as does SSMS). If it wasn't for that rather important detail I'd swear it was working like it should. No errors anywhere, just no data either.
Any ideas?
Best regards,
Martin
Comments
this.Connection.ConnectionString
That returns "'UserQuery' does not contain a definition for 'Connection' and no extension...", I have also tried with the name of one of my classes that is listed in the left hand side instead of "this", and with the name of my DbContext, and receive a similar response.
Best regards,
Martin
P.S: Currently reading C# 5.0 In A Nutshell - Great book, thanks!
The weird thing was that the test was successful, and when running a query it said "Querying" and then "Query successful", but with 0 results. Anyway, to anyone else facing this issue - check your connection drop down, and if necessary try to add a connection to the SQL EXPRESS instance manually.
If there was a way to get the full EF experience (including support for my inherited entity classes) I would love to hear about it, though?