Populate dummy records in SQL Server

Last day, I was playing with paging in SQL Server and had to create some test data to test the same. Here goes the script to generate test data.

DECLARE @UserTable TABLE (Id int, Name nvarchar(150))
;WITH cte AS
    SELECT 1 Id
    UNION all
    SELECT Id + 1
    FROM cte WHERE   Id + 1 <= 100000
INSERT INTO @UserTable(Id,Name)
    SELECT Id, Concat('Name_', convert(int, convert (varbinary(4), NEWID(), 1))) AS Name FROM cte c 
SELECT u.Id, u.Name
    Into DemoUser
    FROM    @UserTable u


Hope this helps.

Woohoo!!! I am featured for Mixed Reality

Super excited.

It's been more than an year, I am mentoring and being a technology speaker. It's always great pleasure and excitement to share what I've learned in my career with the technology community around me. I am super excited to announce that I have been featured on Malayala Manorama - one the largest daily newspaper in India for my efforts on Mixed Reality. Here is a quick snapshot.

And, e-copy of the article - http://www.manoramaonline.com/education/campus-updates/2017/03/27/augmented-reality-virtual-reality-mixed-reality.html

Follow your passion.


Fix: Request blocked while sending JsonResult from MVC Action method

So this happened when I tried to use the return JsonResult from one of my action method.

"This request has been blocked because sensitive information could be disclosed to third party web sites when this is used in a GET request. To allow GET requests, set JsonRequestBehavior to AllowGet."

Here is how you need to return your JsonResult response.

return Json(new { Id = "someid" }, JsonRequestBehavior.AllowGet);

Hope this helps.