Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


When to use Single, SingleOrDefault, First and FirstOrDefault?



When to use Single, SingleOrDefault, First and FirstOrDefault?..

Answer / Manoj Kumar Ram

Use Single or SingleOrDefault when you expect only one result and want either an exception thrown (Single) or the default value returned (SingleOrDefault). Use First or FirstOrDefault when you expect more than one result, but need only the first one.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More LINQ Language-Integrated Query Interview Questions

When to use Single, SingleOrDefault, First and FirstOrDefault?

1 Answers  


What is expression tree in linq?

1 Answers  


How to assign a computed value to the same array back?

1 Answers   B-Ways TecnoSoft,


Why do we need linq?

1 Answers  


Explain what is the extension of the file, when LINQ to SQL is used?

1 Answers  


What are important features of linq?

1 Answers  


What are element operators?

1 Answers  


What is the advantage of linq in c#?

1 Answers  


What is a linqdatasource control?

1 Answers  


Explain why select clause comes after from clause in linq?

1 Answers  


Write a program for concat to create one sequence of data rows that contains datatabless data rows, one after the other?

1 Answers  


Explain what is select clause and where clause in linq?

1 Answers  


Categories