Guest User

Untitled

a guest
Feb 19th, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. ////////////////////////// with LINQ /////////////////////////
  2. foreach (var item in DC.Loans.Where(a => a.LoanType == 435))
  3. {
  4. list<Installments> IList = CreateInstallmentTable(item.LoanNumber);
  5. }
  6.  
  7. public class Installments
  8. {
  9. public int RowId { get; set; }
  10.  
  11. public decimal LoanBalance { get; set; }
  12.  
  13. public decimal InterestPerInstallment { get; set; }
  14.  
  15. public decimal PrincipalPerInstallment { get; set; }
  16.  
  17. public decimal InstallmentAmount { get; set; }
  18. }
  19. /////////////////////////// with PLINQ //////////////////////
  20. foreach (var item in DC.Loans.Where(a => a.LoanType == 435).AsParallel())
  21. {
  22.  
  23. ParallelQuery<Installments> IList =
  24. CreateInstallmentTable(item.LoanNumber).AsParallel();
  25. }
Add Comment
Please, Sign In to add comment