Monday

linq concatenate rows

we can use Aggregate methods to concatenate fields in rows as follow:

var profiles = (from b in invoiceContext.bills
join p in invoiceContext.PaymentProfiles on 1 equals 1
where b.ProfileID == p.Id || b.ProfileType == p.Id
select p.Name).ToList();

if (profiles.Count() > 0)
{
BillingMethodLabel.Text = profiles.Aggregate((current, next) => current + ", " + next);
}


No comments:

here is powershell script on how to get list of files from changesets associated with one tfs task

$dllPath = "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\...