Sunday, July 20, 2014

Understanding of new VNext web project


Dear Friends,

As discussed in last post VNext launched. Now I downloaded VNext to test how to use it.

Let’s understand it step by step

Now when you will try to open new project window. You will find 4 new project template with name VNext as shown below in fig



I tried ASP.NET vNext Web Application.

Now I found a new structure of  Web application and surprised that in next project there is no web.Config file instead on it I found 3 different files

which are

1) Config.json

2) project.json

3) Startup.cs


Now lets understand these files one by one

1) Config.json :- Config.json  by the name it is clear that it will keep all the configuration detail Like your database connection string and etc will reside in this file. see below config.json’s snap


2) Project.json : Project.json file contents all the reference of the project the best part of it as you add the entries in this file it will automatically reflect your project reference. I personally like this  miracle Smile


3) Startup.cs:-

It is something like your console application where you will provide startup file.This file is same like those feature which will startup all the things


Now let see actual physical project structure. You will find a new file which is Kproj.

The Kproj is new type file. “K” is new feature introduce. New compiler is used.


I will explain more features in next post.

Till than enjoy.

Thanks & Best Regards,

Rajat Jaiswal

Wednesday, April 09, 2014

Match value in all the column of table


Dear All,

Recently one of colleague shared a new way of matching the value in all the columns.

Lets understand this by an example

We have person table in which  three column FirstName, LastName, MiddleName exists now suppose we need to find  in all the three column if any column contain letter “A”.

simply this query can be write as mention below

SELECT DISTINCT BusinessEntityID, FirstName,LastName,MiddleName FROM [Person].[Person] WHERE FirstName like ('%a%') Or LastName like ('%a%') Or MiddleName like ('%a%')  ORDER BY BusinessEntityID

Now same query can be write in following manner

SELECT DISTINCT BusinessEntityID, FirstName,LastName,MiddleName FROM [Person].[Person] WHERE FirstName + LastName + ISNULL(MiddleName,'') like ('%a%')  ORDER BY BusinessEntityID

So if you see above query we have concatenate  all the column and then apply like.

The important point is to remember here if a column contain NULL value then you have to convert it.

I hope this is another new way which I learnt hope it may be new for you.

So Enjoy,

Your host

Rajat Jaiswal