Thursday, August 2, 2012

How to use Session in Web Services

We can use session in our web service simply by adding one attribute

In the web method section we need to add just enablesession=true;
here is systax


[webmethod(EnabledSession=true)]
my webmethod
{


}



enjoy coding..

Delete duplicate records from a sql table using cte

Here is a simle query to delete duplicate records from sql table using CTE(Compatible for  sql 2005 and 2008)
 
;WITH emptable (FirstName,LastName, dpcount)
AS
(
SELECT FirstName,LastName,
ROW_NUMBER()OVER(PARTITIONBY FirstName, LastName ORDERBY FirstName) AS dpcount
FROM emptable(table name)
)
DELETE
FROM emptable
WHERE dpcount> 1
 
 
 
Enjoy coding..
 

Convert Html to Pdf in azure function and save in blob container

 In this post  I am going to create an azure function ( httpTrigger ) and send html content  which will be converted into PDF and save in bl...