Explain how you can retrieve a single row with LINQ?



Explain how you can retrieve a single row with LINQ?..

Answer / Prashant Verma

To retrieve a single row with LINQ, use the First() or Single() method on the result of the query. The difference between the two is that First() returns the first element if the sequence contains multiple elements, while Single() throws an exception if there are multiple matching elements.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More LINQ Language-Integrated Query Interview Questions

What is the benefit of using linq in dataset?

1 Answers  


What is dbml in linq to sql?

1 Answers  


What is a lambda expression?

1 Answers  


What are disadvantages of LINQ over Stored Procedures?

1 Answers  


What do you understand by expression tree?

1 Answers  


Differentiate between conversion operator “todictionary” and “ienumerable” of linq.

1 Answers  


How linq is useful than stored procedures?

1 Answers  


What does linq?

1 Answers  


What are LINQ query expressions?

1 Answers  


What are aggregate operators?

1 Answers  


Is linq orm?

1 Answers  


What is Extension method?

1 Answers  


Categories