repo.Products.FirstOrDefault(p => p.Id == id) or repo.Products.Where(p => p.Id == id).FirstOrDefault?

Which one should I use or does it even matter? They both seem to give the same result.

Thanks.

by itshotinjuly via /r/csharp

Leave a Reply