DBLinq does not generate where clause

I am testing DBLinq-0.18 and DBLinq from SVN Trunk with MySQL and Postgresql. I use a very simple query, but in both databases DBLinq does not generate a Where clause. I confirmed this by enabling message logging on Postgresql to see exactly where the DBLinq query is being sent.

My Linq request:

MyDB db = new MyDB(new NpgsqlConnection("Database=database;Host=localhost;User Id=postgres;Password=password"));

var customers = from customer in db.Customers
                where customer.CustomerUserName == "test"
                select customer;

The query works fine, but the DBLinq generated SQL looks like:

select customerusername, customerpassword .... from public.customers

There is no Where clause, meaning that DBLinq should pull out the entire table before running the Linq query.

Has anyone had experience with DBLinq and knew what I can do wrong?

+3
source share
2 answers

I found a problem and it is not related to DBLinq.

- IronRuby, Microsoft.Scripting.Core, System.Data.Linq( ).

Microsoft.Scripting.Core DBLinq , , SQL. , where .

+1

DBLinq ... Linq-To-SQL , ... "unterminated".

... !

0

Source: https://habr.com/ru/post/1706590/


All Articles