Monday, February 11, 2013

How to generate population script from existing data?

From SQL Management Studio
1. Select database
2. Right click and choose Task
3. Choose generate scripts
4. Choose objects
5. Select specific database objects
6. ... Go to advance. In General block choose 'Data Only' for type of data to script.

UnitTest code generation in VS2012

You can generate unit test by running command EditorContextMenus.CodeWindow.CreateUnitTests.
How
In option go to Keyboard left side menu. Search for the command. Put for instance unittest.  Add keyboard mapping to the above command. For instance assign it to the command Ctrl+Shift+?
Open you file and press you shortcut keys.