Tuesday, September 2, 2014

If programming languages were weapons

http://bjorn.tipling.com/if-programming-languages-were-weapons

C# is a powerful laser rifle strapped to a donkey, when taken off the donkey the laser doesn’t seem to work as well.

Monday, August 25, 2014

How to get sql query from LINQ?

Before getting linq data, using ToString method. Will see the generated SQL.
It is not easy to read and understand.

   var soldOutProducts = 
            from p in products 
            where p.UnitsInStock == 0;

   string sql =  soldOutProducts.ToString();

Wednesday, August 13, 2014

Scheduled Tasks In ASP.NET With/Without Quartz.Net

With:
http://www.mikesdotnetting.com/Article/254/Scheduled-Tasks-In-ASP.NET-With-Quartz.Net

Without:
        protected void Application_Start()
        {
            System.Timers.Timer myTimer = new System.Timers.Timer(10 * 60 * 1000);
            myTimer.Elapsed += new System.Timers.ElapsedEventHandler(ScheduledTaskMethod);
            myTimer.AutoReset = true;
            myTimer.Enabled = true;
 }