Edil Guardado

Edil Guardado

  • NA
  • 32
  • 654

Translate to LINQ

Aug 21 2017 4:00 PM
Hi everyone,
I'm writing a query using VB.NET and I'm having problems in my where clause. 
 
If the value of [rdbTitleAndSettlement.Checked]  then I want to return all records where app.ss is false, if the value of [rdbProductAndServices.Checked] then I want to return all records where app.ss is true, else I want to return app.ss where values are both true and false.
 
App.SS contains a boolean value.
 
What Am I doing wrong?
 
Thanks in advance 
  
  1. Dim AppInfo = (From app In dc.APPLICATIONs  
  2.                           Where If(rdbTitleAndSettlement.Checked, app.SS = FalseIf(rdbProductAndServices.Checked, app.SS = True, app.SS <> Null))  
  3.                           Select  
  4.                                                 Reader = app.Examiner.Examinname,  
  5.                                                 Index = app.APPLICATIONSIDNUMBER,  
  6.                                                 Title_Number = app.TITLENO)  
  7.                

Answers (2)