Share via

Error on Linq

Mohammad Qasim 576 Reputation points
2021-01-01T12:19:58.08+00:00

Hi,

I am using linq , its giving me error while creating query using LINQ ( download the snap short for reference )

Note: I have to list ,want to make join and apply group to get data accordingly

Thanks

Microsoft 365 and Office | SharePoint Server | Development

1 answer

Sort by: Most helpful
  1. MichaelHan-MSFT 18,136 Reputation points
    2021-01-05T08:26:51.047+00:00

    Hi, @Mohammad Qasim ,

    If possible, please share the complete code of your project as well as the list data so that I could help you better.

    For your first screenshot, you could try to remove the Cast method after list.GetItems(query). Check if it work for you.

    Remove this:
    53518-image.png

    For the 2nd, you could try this:

     select new {itmdossier, itmCountry } into t1  
     group t1 by new { resDosParent= Convert.ToInt32(t1.itmdossier[_DossierParentID]) } into g  
    

    If an Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.