title: Transaction (Process ID 56) was deadlocked on lock?
body: <p>Here I am working with <strong>Linq to sql I have more then 30000 row</strong> in my table. </p>
  
  <p>I used following query for fetching record from database :</p>
  
  <pre><code>IEnumerable&lt;DealsDetails&gt; DD = (from D in DealDbContext1.Deals
                                              where D.Address == City &amp;&amp; (D.DealTime &gt;= DateTime.Now || D.DealTime == dealcheck) &amp;&amp; PriceMax &gt;= D.DealPrice &amp;&amp; D.DealPrice &gt;= PriceMin &amp;&amp; DisCountMax &gt;= D.SavingsRate &amp;&amp; D.SavingsRate &gt;= DiscountMin &amp;&amp; (D.DealTime &gt;= DateTime.Now.AddDays(TimeMin) &amp;&amp; D.DealTime &lt;= DateTime.Now.AddDays(TimeMax) || D.DealTime == dealcheck)
                                              select new DealsDetails(
                                                  lst,
                                                  D.DealId,
                                                  D.DealHeadline,
                                                  D.DealCategory,
                                                  D.BuyPrice,
                                                  D.DealPrice,
                                                  D.SavingsRate,
                                                  D.SavingAmount,
                                                  D.RelatedWebsite,
                                                  D.Address,
                                                  string.Empty,
                                                  D.DealImage,
                                                  string.Empty,
                                                  string.Empty,
                                                  D.Time, D.CurrentTime, D.DealTime,
                                                 D.Location, string.Empty, string.Empty, D.Latitude, D.Longitude, D.Islocal, D.VendorMail, D.MerchantInfo, D.Review, D.HowItWork, D.DealUrl
                                                  ));
  
  
  
  if (lstSite.Count &gt; 0 &amp;&amp; lstSite[0] != "AllDeals")
                  {
                      DD = DD.Where(D =&gt; D.RelatedWebsite.Split(',').Where(x =&gt; lstSite.Contains(x)).Any()); //.Where(row =&gt; row.Category.ToList().Where(x =&gt; lst.Contains(x)).Any()).ToList();
              }
  </code></pre>
  
  <p>Some time my query run successfully or some time I got <strong>Error :</strong> Transaction (Process ID 56) was deadlocked on lock | communication buffer resources with another process and has been chosen as the deadlock victim. Rerun the transaction.</p>
  
  <p>Thanks in advance...</p>