title: Generating more than 400K (almost half a million) Random Numbers - Entity Framework or SQL
body: <p>I have requirement where i have to generate more than 4 lacs (almost half a million) random numbers. These are my different vouchers to distribute to my e-commerce customers. 
  I am using Entity framework and am calling sql stored procedure using "ExecuteStoreQuery" method. And in SQL server i am using <strong>Left(newid(),7)</strong> function to generate these numbers. 
  So basically this function returns left 7 digits of 16 digits generated random numbers in sql. This sp takes almost 1.5 to 2 mintues to generate 450K numbers which is fine and OK. There is no issue for less than 50k numbers, but for more than that i am getting duplicate numbers. 
  I can not use whole 16 digit number as it is quite long for Voucher to end user to enter.</p>
  
  <p>Kindly help. 
  I m using ASP.net MVC 4.0 with EF 6.0 with SQL Server 2008 R2.</p>
  
  <p>Thanks in advance.</p>