Issue Details (XML | Word | Printable)

Key: DNET-926
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: Jiri Cincura
Reporter: Ryno
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
.NET Data provider

Dynamic SQL Error SQL error code = -104 Token unknown AND - EF Core - Two or more *Where* parameters in LINQ to SQL

Created: 15/Jan/20 09:39 AM   Updated: 15/Jan/20 09:41 AM
Component/s: Entity Framework Core
Affects Version/s: None
Fix Version/s: None

Environment: FirebirdSql.Data.FirebirdClient - Firebird .NET EF Core


 Description  « Hide
 List<Document> documents = new List<Document>();

            var docs = (from d in db.Documents
                        where d.DOCUMENT_DATE >= startDate & d.DOCUMENT_DATE <= endDate
                        select d).ToList();

            foreach (Document doc in docs)
            {
                documents.Add(doc);
            }

            return documents;



RETURNS

SELECT "d"."DOCUMENT_ID", "d"."CLIENT_REF", "d"."CONVERSION_RATIO", "d"."CUSTOMER_CODE", "d"."DELIVERY_ADDRESS", "d"."DOCUMENT_DATE", "d"."DOCUMENT_TIME", "d"."DOC_NUMBER", "d"."DOC_STATUS", "d"."DOC_TYPE", "d"."EXCL", "d"."EXL_BIN", "d"."EXL_OVERREC", "d"."EXL_SURCHARGE", "d"."EXL_TRANSPORT", "d"."FINANCAIL_PERIOD", "d"."GROSSWEIGHT", "d"."INCL", "d"."INCL_BIN", "d"."INCL_OVERREC", "d"."INCL_SURCHARGE", "d"."INCL_TRANSPORT", "d"."INSTRUCTIONS", "d"."M3_QTY", "d"."MANUAL_NUMBER", "d"."OPTIONS", "d"."ORDER_NUMBER", "d"."PRICELIST_ID", "d"."PRODUCT_CODE", "d"."PRODUCT_UNIT", "d"."QTY", "d"."SUPPLIER_CODE", "d"."SURCHARGE_QTY", "d"."TRUCKTARE", "d"."VAT", "d"."VAT_CODE", "d"."VEHICLE_REG", "d"."ZONE_CODE"
FROM "DOCUMENT" AS "d"
WHERE (CASE
    WHEN "d"."DOCUMENT_DATE" >= CAST(@__startDate_0 AS TIMESTAMP)
    THEN TRUE ELSE FALSE
END AND CASE ---- ERROR
    WHEN "d"."DOCUMENT_DATE" <= CAST(@__endDate_1 AS TIMESTAMP)
    THEN TRUE ELSE FALSE
END) = TRUE

Which is invalid FB Sql


 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
There are no comments yet on this issue.