Skip to main content

Posts

Showing posts from September, 2015

Case sensitive search on column in SQL Server

Suppose we have a table #TBL with column SEARCH_CONTENT which have values like 'DILIP SINGH', 'dilip singh' and 'Dilip Singh' like below.
CREATETABLE #TBL (       ID INTIDENTITY(1,1),       SEARCH_CONTENT VARCHAR(500) )
INSERTINTO #TBL(SEARCH_CONTENT) SELECT'DILIP SINGH' UNIONALL SELECT'dilip singh' UNIONALL SELECT'Dilip Singh'
If you will run following script it will return three row of table
SELECT*FROM #TBL WHERE SEARCH_CONTENT LIKE'%DILIP SINGH%'
Result ID          SEARCH_CONTENT ----------- ----------------------- 1           DILIP SINGH 2           dilip singh 3           Dilip Singh
Above query may be change in case sensitive to change collation of query. See following query.
SELECT*FROM #TBL WHERE SEARCH_CONTENT  COLLATE Latin1_General_CS_AS LIKE'%DILIP SINGH%'
Result ID          SEARCH_CONTENT ----------- ------------------------ 1           DILIP SINGH

Here  COLLATE Latin1_General_CS_AS makes the search case sensitive.

Difference between MVC3, MVC4, MVC5, MVC6

Microsoft has added exciting features in every new version of ASP.NET MVC that make developers more comfortable building scalable web applications easily. In this ASP.NET MVC tutorial, we will have a quick look into new and important features introduced in major versions of Microsoft ASP.NET MVC starting fromMVC3 to MVC6 (the latest one so far).
ASP.NET MVC3 New Project Templates having support for HTML 5 and CSS 3.Razor View Engine introduced with a bundle of new features.Having support for Multiple View Engines i.e. Web Forms view engine, Razor or open source.
ASP.NET MVC 4 ASP.NET Web APIRefreshed and modernized default project templatesNew mobile project templateMany new features to support mobile appsDisplay ModesBundling and MinificationEnabling Logins from Facebook and Other Sites Using OAuth and OpenID
ASP.NET MVC 5 Attribute based routing such as [Route("Empolyee/{EmpID}")].ASP.NET Identity for authentication and identity management.ASP.NET Identity is a new Membership pr…