Let's unpack it:
return listname.Single(m => m.ID == id)
Single() asserts that there MUST be one and only one match in the entire collection for the lambda.
If we were to rewrite this without LINQ it might look like this:
Item GetOneAndOnlyOneItemWithId(List<Item> items, string id)
{
if (items is null) throw new ArgumentNullException("source can't be null");
Item match = null;
foreach (var item in items)
{
if (item.Id == id)
{
if (match != null) throw new InvalidOperationException("There is more than 1 match!");
match = item;
}
}
if (match == null) throw new InvalidOperationException("no matchez");
return match;
}
As you can see, it's much more complex than using LINQ. Single() contains a lot of assertions, as opposed to FirstOrDefault() for example. The more you learn about programming and .NET the more useful LINQ will be to you. LINQ exists so we do not have to re-invent the wheel for general data-wrangling like this. It is built upon generics which allows common logic to be re-used across IEnumerables of any types. In other words, don't fight LINQ, learn it!