rewrite Linq to SQL

Viewed 43

I have a linq query in VB.NET:

Dim i = ( _
    From o In model.DUIMAINs _
        .Include("VIOLATOR") _
        .Include("ARRESTINGOFFICER") _
        .Include("DR15") _
    Where _
        o.BREATHRESULT Is Nothing _
    Order By _
        o.ARRESTDATETIME _
)

and I am checking the tables by the writing the corresponding SQL query

SELECT
    *

FROM
    "DUI" ."DUI_MAIN"           main,
    "DATA"."TBL_TRAFFIC_PERSON" violator,
    "HRIS"."TBL_PERSONNEL"      ARRESTINGOFFICER,
    "DUI" ."DR15"               dr15,
    "DUI" ."BREATHRESULTS"      BREATHRESULTS

WHERE
    main.Duiguid = 'deaee240-cdc3-4b50-b215-51307e7d96a5'
    and
    main.Duiguid = violator.seq_guid
    and
    main.arrestingofficerusername = ARRESTINGOFFICER.USERNAME
    and
    main.Duiguid = dr15.Duiguid

and the results are coming back correct (at least the tables are being populated correctly) however for the where clause I have question

QUESTION? How do i write the

Where o.BREATHRESULT Is Nothing

in my SQL Code where BREATHRESULT is a table. Common Key is Duiguid.

0 Answers
Related