I have been using Linq methods for a while in my project. But got to know an another way of writing them.
What I wrote:
dbContext.Currencies
.FirstOrDefault(cr => cr.Name.EqualInvariant(currencyName))
Another way I got to know:
(from curr in dbContext.Currencies
where curr.Name == currencyName select curr).FirstOrDefault();
Which method is more efficient?