I have this simple 2 lines of following code. It compiles fine but never return results in the datagridview. If I change func to p=> p.PTNT_FIRST_NAME.StartsWith(this.textBox1.Text)
, it works just fine. What's the problem here?
Func<PATIENT, bool> func = (PATIENT p) => p.PTNT_FIRST_NAME.StartsWith(this.textBox1.Text);
this.dataGridView1.DataSource = dataContext.PATIENTs.Where<PATIENT>(func).Select(q => q);