Checking Luggage When Traveling

Many business travelers will tell you never to check a bag.  This is typically a true concept for simple trips or very short trips.  But this is typically only true for domestic flights.  It's simply too much work when traveling internationally to worry about bags.  After all you only get one carry on and a personal item.  For my female friends this means a backpack and a purse and that's it!

If you do travel internationally just a little bit of wisdom, especially if you are using different airlines throughout your trip:

- Make sure so hold on to your bag check tag.

This is the little receipt looking paper that you will get from the gate agent when you check your bag.  Make sure to hold on to this receipt, if you lose it they may not be able to find your bag when you make another connection.

Either way, hold on to that tag and don't be too afraid to check, on longer flights it is totally worth the worry-free experience.

Safe travels!

-Brent

Send Files via Skype using Windows Context Menu

So I was going to use the normal route of sending a file to a colleague today.  Normally I either attach a file to an Outlook E-Mail or use the Windows context menu (Right-Click) to send the file as an e-mail attachment.  I went with the context menu route today and found a feature I am not used to seeing… Skype!

Image001

Needless to say my colleague was also on Skype.  Once I clicked on the Skype option it opened the normal Skype window where I could select the contact to send the file to.

Image002

Once I selected the contact it sent a normal File Transfer Request via Skype to my contact.

Pretty easy, and cool!

-Brent

Using DateTime2 with Entity Framework

A common problem posted all over the web is in regards to DateTime2 errors thrown by Entity Framework.  Those problems are typically associated with the system generating invalid column and data types that are not supported by the older versions of MSSQL.  Fixing those problems is typically pretty easy and requires an update to the EDMX XML to specify the right database version to target.

My issue however is that I actually want to use DateTime2 as the column data type.  There are many reasons why you may want to do this and the benefits outweigh any risks associated with it.  The problem is however that there is no DateTime2 data type in .NET, only DateTime so when the T-SQL code is generated for the database (in model first mode) it will utilize the default DateTime column type and not DateTime2.

The solution below will change all DateTime data types in your model to utilize DateTime2 SQL storage types.  You cannot pick and choose easily which tables should use DateTime2 versus the default DateTime.  The entire solution is based around modifying the default T4 template for your project.

  1. Browse to: %ProgramFiles(x86)%\Microsoft Visual Studio 10.0\Common7\IDE\Extensions\Microsoft\Entity Framework Tools\DBGen
  2. Copy the SSDLToSQL10.tt file to your project directory
  3. Browse to %ProgramFiles(x86)%\Microsoft Visual Studio 10.0\Common7\IDE\Extensions\Microsoft\Entity Framework Tools\Templates\Includes
  4. Copy the GenerateTSQL.Utility.ttinclude file to your project directory.

Note: I like to keep my template files in a different folder from my models and a sub-directory in the templates folder to store the include files.

  1. Edit the SSDLToSQL10.tt file
  2. Update the T4 file with the following code: http://codepaste.net/rchy2s
  3. Change the template filename in the EDMX Designer:

1-2-2012_2-07-17_pm

Now all you have to do is re-generate the model and the DateTime2 type should be used.

-Brent

Using a Higher Screen Resolution Effectively

As computers and specifically video cards and displays get better there is one common complaint amongst users.  It’s the standard “It’s too small! I can’t read the screen!”  I personally run two 1920x1200 Acer displays and my laptop has a built-in display running the same resolution.  On the 24” Acer monitors that resolution isn’t bad at all, however on a smaller portable 17” Laptop screen things get a bit interesting.

What most folks do is simply decrease their screen resolution to make things bigger.  However, the drawback here is that the video card and displays themselves don’t always support smaller formats well or at all so things tend to look disproportionate or out of focus, creating even more complaints.  Here is a simple solution, built in to Windows, that helps with this problem while still using the higher, crisper, and cleaner resolutions:

1.      Open the screen resolution window (Right-Click on the Desktop for the context menu)

Image001

2.      Select the option at the bottom called “Make text and other items larger or smaller”

Image005

3.      From here you can now change the default sizing of the screen.  Essentially this increases how text, buttons and Windows objects appear on the screen.

Image004

I really like this solution, specifically because it does make certain buttons a bit larger.  Having the larger minimize, maximize and close buttons is helpful.  This is also a great procedure to use if you are dealing with a tablet or touchscreen interface running Windows as some of the built-in buttons are a bit small, especially for those of us with larger fingers!

Hope this helps someone!

-Brent