Advertisement
Guest User

Untitled

a guest
Jun 19th, 2019
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. var a = new List<aDrivingCursor>();
  2. //execute stored proc 1
  3. sp.Execute(out aDrivingCursor);
  4.  
  5. var b = new List<bDrivingCursor>();
  6. //execute stored proc 2
  7. sp2.Execute(out bDrivingCursor);
  8.  
  9. foreach (var temp in aDrivingCursor)
  10. {
  11.  
  12. int areaId = 0
  13. if (b.Any(s => s.Address1 == temp.Address1))
  14. {
  15. //This is where I'm having problem with
  16. areaId = Int32.Parse(b.Where(s => s.Address1 ==a.Address1).FirstOrDefault().Select(o => o.AreaId));
  17.  
  18. }
  19. }
  20.  
  21. class aDrivingCursor
  22. {
  23. public int Address1 { get; set; }
  24. }
  25.  
  26. class bDrivingCursor
  27. {
  28. public int AreaId { get; set; }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement