When I run this query in linqpad :
Customer.Where(c => (c.CustomerName == "test"))
It returns a record that matches.
When I try to run the same query in visual studio , it does not return any matching records. This is the code I'm using:
List<Customer> customerList = new List<Customer>(); using (DBEntities db = new DBEntities()) { try { customerList = db.Customer.Where(c => (c.customerName == "test")).ToList(); } catch (Exception ex) { MessageBox.Show(ex.ToString()); } } return customerList;
Can anyone understand why this works in linqpad but does not work in visual studio ?
user1696698
source share