When I want to fetch an entity, I normally have a method that uses a query. This method will always query the database and you will have an up-to-date entity. But if you need better performance perhaps GetObjectByKey() is a better option. This method will check the cache first and returns the entity when [...]
Archive for August, 2009
Generate INSERT INTO script for existing data in Sql Server 2008
It always amazes me how little features are built into Sql Server Management Studio. One of these (trivial) things is to generate a script which inserts existing data. Fortunately, it has become a feature in Sql Server 2008. short story: right click the database > tasks > generate scripts > enable “script data” option full [...]
VPN shortcut in Windows 7
I’m amazed how hard it is to create a shortcut to a vpn connection. In Vista it already wasn’t that obvious, and in windows 7 it’s even more hidden! Hopefully I can save you a couple of minutes while performing this incredibly complex task: check out “Network and Sharing Center” and select “Change adapter settings” [...]
Sql Server 2008: Can’t save changes that require Recreation of Database
There's a silly new default in SQL Server's Management Tools: When you design a table in a database and then try to make a change to a table structure that requires the table to be recreated, the management tools will not allow you to save the changes. The fix is: Go to Tools | Options [...]