Category Archives: VB.NET

Alias names in LINQ

Finally figured out how to set alias names in LINQ, and it’s easy. Dim orgs = From p In db.Departments Select p.deporg, Name = p.deporg & " – " & p.depname Order By deporg Name being the name of the … Continue reading

Posted in SQL, VB.NET, Visual Basic | Tagged | Leave a comment

LINQ: Filtering against a list

I was trying to filter a LINQ query against a hard coded list and Visual Studio kept complaining that it was wrong. I was trying to do something like this: Dim orgnums As New List(Of String) orgnums.Add("210") orgnums.Add("750")   Dim … Continue reading

Posted in Programming, VB.NET, Visual Basic | Tagged , , | Leave a comment