C#: Interface-Based Programming — Visual Studio Magazine

C#: Interface-Based Programming

Interfaces can make your applications easier to test and maintain.

Interfaces help define a contract, or agreement, between your application and other objects. This agreement indicates what sort of methods, properties and events are exposed by an object. But interfaces can be utilized for much more. Here, we’ll look at how interfaces can help make your applications and components easier to test.

http://visualstudiomagazine.com/Articles/2010/01/01/Interface-Based-Programming.aspx?m=1&Page=1

Rename Visual Studio Window Title extension

Rename Visual Studio Window Title extension

This lightweight extension will change the window title of Visual Studio to include a folder tree with a configurable min depth and max depth distance from the solution/project file, or using special tags.

http://visualstudiogallery.msdn.microsoft.com/f3f23845-5b1e-4811-882f-60b7181fa6d6

 

Restoring SQL Server Database simple summary steps

I always tend to forget the order of this. A short summary for restoring a Sql server  .bak file:

1. Restore database. (Run Sql Server Manager as admin, make sure you window user have access rights to appropiate folders etc).

2. Delete the accompanied database user that is on the “database”. (user should be on database server scope not on the database)

3. If there isn’t already a user on the database server user level, create one, and set the user mapping for user -> database owner of -> newly restored db.

How to: View and Edit Code by Using Peek Definition (Alt+F12)

How to: View and Edit Code by Using Peek Definition (Alt+F12)

Visual Studio 2013

You can use the Peek Definition command to view and edit code without switching away from the code that you’re writing. Peek Definition and Go To Definition show the same information, but Peek Definition shows it in a pop-up window, and Go To Definition shows the code in a separate code window. Go To Definition causes your context (that is, the active code window, current line, and cursor position) to switch to the definition code window. By using Peek Definition, you can view and edit the definition and move around inside the definition file while keeping your place in the original code file.

via How to: View and Edit Code by Using Peek Definition (Alt+F12).

Show all tables where table name contains ‘log’

Select * From INFORMATION_SCHEMA.TABLES
Where
table_name LIKE '%log%'
AND
table_name NOT LIKE '%catalog%'

Show table columns with a specified name:

Use DatabaseName
Select*From INFORMATION_SCHEMA.COLUMNS Where column_name ='ColName'

sql – I want to show all tables that have specified column name – Stack Overflow.

An Overview of Project Katana : The Official Microsoft ASP.NET Site

The ASP.NET Framework has been around for over ten years, and the platform has enabled the development of countless Web sites and services. As Web application development strategies have evolved, the framework has been able to evolve in step with technologies like ASP.NET MVC and ASP.NET Web API. As Web application development takes its next evolutionary step into the world of cloud computing, project Katana provides the underlying set of components to ASP.NET applications, enabling them to be flexible, portable, lightweight, and provide better performance – put another way, project Katana cloud optimizes your ASP.NET applications.

via An Overview of Project Katana : The Official Microsoft ASP.NET Site.