You are using LINQ to SQL to query a database. You need to retrieve an entity by its primary key when querying an entity set. If the query does not return exactly one match, the query must throw an exception.

Which LINQ operator should you use?

 Posted by Rajkatie on 8/31/2012 | Category: ADO.NET Interview questions | Views: 2382 | Points: 40
Select from following answers:
  1. Single
  2. SingleOrDefault
  3. FirstOrDefault
  4. First
  5. All Above

Show Correct Answer


Source: MeasureUp.Com | | Alert Moderator 

Comments or Responses

Login to post response