Browsed by
Month: May 2016

Year first date literals in Visual Basic .NET

Year first date literals in Visual Basic .NET

Since I write on a daily base unit tests, I’m wondering more and more why there is not an easy – and especially unambiguous – way to provide a hardcoded date to a variable or procedure argument. Do you know, without any doubt, what this date actually means? Was I born on the 5th of June or the 6th of May? Visual Basic .NET will support now a good ISO-standard, which starts with the year. It follows the convention of…

Read More Read More

Show generated SQL of Entity Framework in Visual Basic .NET

Show generated SQL of Entity Framework in Visual Basic .NET

When you are writing LINQ queries against an Entity Framework context, you don’t have to worry about the SQL which is generated and executed. However, in some cases you may be interested in this SQL. It’s quite easy to switch on a logging mechanism which will be display all executed SQL in your Debug window. You have to provide an Action to the DbContext.Database.Log property. You provide a lambda with the functionality you want. If you want you can log…

Read More Read More