Sunday, February 25, 2018

How do I put the results of a LINQ SQL Query into a C# Variable?

I want to store alpha text that is returned on a LINQ Query into a local variable. How would I do so?

My Code (not working):

 var qCustomerID = from c in dcCustomers.Customers where c.CompanyName == strCustomer select c.CustomerID; strCustomerID = qCustomerID.FirstOrDefault(); 
How do I put the results of a LINQ SQL Query into a C# Variable? Click here
  • Blogger Comment
  • Facebook Comment

0 comments:

Post a Comment

The webdev Team