Wednesday, April 20, 2011

linqpad

 

LINQPad is a free software utility for Microsoft .NET developers using LINQ. It allows developers to interactively query SQL databases and other data sources such WCF Data Services using LINQ.

LINQPad supports the following LINQ dialects:

  • LINQ to Objects
  • LINQ to SQL
  • Entity Framework
  • LINQ to XML


It also supports writing queries in SQL as well.

Aside from being useful for writing queries, LINQPad can be used to interactively write C# code without having to compile it. This expands its use to a general "test workbench" where C# code can be quickly prototyped outside of Visual Studio.

download linqpad

Monday, April 11, 2011

Find Text within all stored procedures

 

select * from INFORMATION_SCHEMA.ROUTINES
Where ROUTINE_DEFINITION like '%searchstring%'

The following statement will search all stored proc in database containing the name ‘aspnet_Membership

select * from INFORMATION_SCHEMA.ROUTINES
Where ROUTINE_DEFINITION like '%aspnet_Membership_%'

image

following statement will search a text inside the stored procedure

select * from INFORMATION_SCHEMA.ROUTINES
Where ROUTINE_DEFINITION like '%INNER JOIN aspnet_UsersInRoles UR%'

 

image

NPOI

 

This project is the .NET version of POI Java project at http://poi.apache.org/. POI is an open source project which can help you read/write xls, doc, ppt files. It has a wide application.

For example, you can use it to generate a Excel report without Microsoft Office suite installed on your server and more efficient than call Microsoft Excel ActiveX at background; you can also use it to extract text from Office documents to help you implement full-text indexing feature (most of time this feature is used to create search engines).

more info

Monday, April 04, 2011

NuGet

 

NuGet is a Visual Studio extension that makes it easy to install and update open source libraries and tools in Visual Studio.

When you use NuGet to install a package, it copies the library files to your solution and automatically updates your project (add references, change config files, etc). If you remove a package, NuGet reverses whatever changes it made so that no clutter is left.

more info

Sunday, April 03, 2011

Explicitly Implementing Interface

 

Explicit implementation can be helpful when class implements interfaces having save method signatures

interface IAgency
    {
        void AddUpdate();
    }
    interface IPackage
    {
        void AddUpdate();
    }
    class Travel : IAgency, IPackage
    {
        public void AddUpdate()
        {
        }
    }


By Implementing Interfaces explicitly we can avoid the above problem



interface IAgency
{ 
    void AddUpdate();    
}
interface IPackage
{ 
  void AddUpdate();    
}
class Travel : IAgency,IPackage
    {
        
        void IAgency.AddUpdate()
        {
            throw new NotImplementedException();
        }
        void IPackage.AddUpdate()
        {
            throw new NotImplementedException();
        }
}


Travel obj = new Travel();
//obj.AddUpdate();  // Compiler error.
IAgency objAgency = (IAgency)obj;
objAgency.AddUpdate();  // Calls IAgency.AddUpdate on Travel 
IPackage objPackage = (IPackage)obj;
objPackage.AddUpdate(); // Calls IPackage.AddUpdate on Travel 

Friday, April 01, 2011

Code Analysis, Team Standards, Unit Testing, Code Coverage and Profiling for .NET

CodeIt.Right provides a fast, automated way to ensure that your source code adheres to (your) predefined design and style guidelines as well as best coding practices. We take static code analysis to the next level by enabling rule violations to be automatically refactored into conforming code. CodeIt.Right helps to improve your software quality, ensure code correctness, find issues early and resolve them quickly. Whether you are starting a new project or maintaining existing product, CodeIt.Right is the right choice!

 

TestMatrix helps you improve the quality of your code by making test driven development painless and convenient. TestMatrix adds support for unit testing, code coverage analysis, and test profiling to Visual Studio, seamlessly incorporating these critical development practices directly into the coding process itself.

 

GhostDoc is a free Visual Studio extension that automatically generates XML documentation comments for methods and properties based on their type, parameters, name, and other contextual information.

 

PrettyCode.Print for .NET Produce professionally styled color coded printouts of .NET source code. Create your own style for all your project documentation. Once you've defined your own settings, everything you print will look consistent and professional - the way you want it.