Question from the Entity Framework test

Write a LINQ query to select all rows from the first table in the dataset where the ContactName field is not null.

Hard

You are using Visual Studio 2010 and the .NET Framework 4 to create an application. The application connects to a SQL Server database. You use the following SQL statement to retrieve an instance of a DataSet called ds: SELECT CustomerID, CompanyName, ContactName, Address, City FROM dbo.Customers.

You need to query the DataSet to retrieve only the rows that have the ContactName field not null. What code segment should you use?

Author: Guillaume BroutStatus: PublishedQuestion passed 163 times
Edit
0
Community EvaluationsNo one has reviewed this question yet, be the first!