How to translate this LINQ to SQL RRS feed

  • Question

  • var DistinctBroker = objQcVerticalViewNewProcess.ResultData.Select(x => new { x.BrokerCode, x.BrokerName })


    please how to translate this above LINQ to SQL which will execute in SQL server?

    can i use Row ROW_NUMBER() function in this scenario & take row_num=1 ?

    should i use group by ?

    what will be best?


    Wednesday, August 14, 2019 3:13 PM


  • Unless I am misreading something, it is a straightforward translation:

    SELECT DISTINCT x.BrokerCode, x.BrokerName FROM theTable As x

    • Marked as answer by Sudip_inn Friday, August 16, 2019 7:07 AM
    Wednesday, August 14, 2019 3:42 PM