Category Archives: Visual Basic

Shout Out: Build Version Increment Add-In Visual Studio

Awesome plugin for Visual Studio. I wanted to automatically increment my version info in YYYY.MM.DD format and this makes it easy. You can find it on the CodePlex site. Just make sure that after you configure it you save your … Continue reading

Posted in Visual Basic | Tagged | Leave a comment

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

Group in LINQ

I keep forgeting how to group by in LINQ and it’s something I do regularly. So here is my cheat sheet. Here is the original T-SQL. SELECT orgno, psno, sche, projid, RecType, Sum(OBBudExpAmt) AS OBBudExpAmt, Sum(ABBudEncAmt) AS ABBudEncAmt From tbl908_BudSPDGrps … Continue reading

Posted in Programming, Visual Basic | Tagged , , , , | Leave a comment