I am getting the following error when I try to use Where clause in a LINQ statement:
Error 1 Cannot implicitly convert type 'System.DateTime' to 'bool'
I am trying to get back an ID from a table that has a matching date from combobox value. Table I am getting the information from consists of a field call PK_StatementDateID (bigint type) and InvoiceDate (datetime type). What am I doing wrong here?
Statements_ARDataContext db = new Statements_ARDataContext();
var Id = from d in db.GetTable<StatementDate>()
where d.InvoiceDate = Convert.ToDateTime(comboBox1.SelectedValue)