July 2018
Beginner
552 pages
13h 18m
English
LINQ provides object queries when working with .NET objects, SQL, XML, and ADO.Net datasets. It has some performance advantages for in-memory processing, as the following example nicely demonstrates:
$path = "E:\Test"$filter = "TestFile1*"#Get-ChildItem with excludeMeasure-Command -Expression { $files = Get-ChildItem -Path "$path\*" -Filter $filter -Exclude *000* | Sort-Object -Property LastWriteTime -Descending | Select-Object -First 5} | Select-Object -Property TotalSeconds #17 - 20 seconds#Get-ChildItem with Where-Object filteringMeasure-Command -Expression { $files = Get-ChildItem -Path $path -Filter $filter | Where-Object Name -NotLike *000* | Sort-Object -Property LastWriteTime -Descending | Select-Object -First 5} | Select-Object ...
Read now
Unlock full access