Advertisement
Guest User

Exceptionally slow database response time on Linq query

a guest
Feb 26th, 2012
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.42 KB | None | 0 0
  1. t.states = (from s in tmdb.tmZipCodes
  2. where zips.Contains(s.ZipCode) && s.tmLicensing.Required.Equals(true)
  3. group s by new Licensing {
  4. stateCode = s.tmLicensing.StateCode,
  5. stateName = s.tmLicensing.StateName,
  6. FIPSCode = s.tmLicensing.FIPSCode,
  7. required = (bool)s.tmLicensing.Required,
  8. requirements = s.tmLicensing.Requirements,
  9. canWorkWhen = s.tmLicensing.CanWorkWhen,
  10. appProccesingTime = (int) s.tmLicensing.AppProcessingTime
  11. }
  12. into state
  13. select state.Key).ToList();
  14.  
  15. s.tmLicensing.Required.Equals(true)
  16.  
  17. s.tmLicensing
  18.  
  19. t.states = (from s in tmdb.tmZipCodes
  20. where zips.Contains(s.ZipCode) && s.tmLicensing.Required.Equals(true)
  21. select new Licensing {
  22. stateCode = s.tmLicensing.StateCode,
  23. stateName = s.tmLicensing.StateName,
  24. FIPSCode = s.tmLicensing.FIPSCode,
  25. required = (bool)s.tmLicensing.Required,
  26. requirements = s.tmLicensing.Requirements,
  27. canWorkWhen = s.tmLicensing.CanWorkWhen,
  28. appProccesingTime = (int) s.tmLicensing.AppProcessingTime
  29. }).Distinct().ToList();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement