locked
Dynamic Linq to DataTable Sum/GroupBy RRS feed

  • Question

  • I'm using the Dynamic Linq library to query data tables. I'm trying to execute a statement similar to

        dt.AsEnumerable.AsQueryable
        .Select(Name as name, sum(credit - debit) as balance)
        .GroupBy(name)


    I'm using the solution outlined below.
    http://social.msdn.microsoft.com/Forums/is/linqprojectgeneral/thread/8f6f2352-34f6-46a4-b61f-2953417bfdfc


    It works with statements such as
         dt.AsEnumerable.AsQueryable
        .Select(Name as name, sum(credit) as balance)
        .GroupBy(name)


    However when I add the complex sub statement to the select I cannot get it to execute.


    I would appreciate any assistance.
    • Edited by keithnolan Tuesday, March 20, 2012 11:35 AM
    Tuesday, March 20, 2012 11:22 AM

All replies

  • Hi keithnolan,

    Welcome to MSDN Forum.

    I will do more research on this issue and come back as soon as possible. Thanks for your understanding.

    Best Regards


    Allen Li [MSFT]
    MSDN Community Support | Feedback to us

    Friday, March 23, 2012 9:46 AM
    Moderator
  • Thanks for your assistance, I would appreciate any help.
    Tuesday, March 27, 2012 11:38 AM