Duplicate Rows when Data Binding with LINQ to Entities

前端 未结 4 658
野性不改
野性不改 2020-12-05 19:38

I have problems binding both a telerik RadGrid and a plain vanilla ASP.NET GridView to the results of the following LINQ to entities query. In both cases the grids contain

4条回答
  •  萌比男神i
    2020-12-05 20:42

    I faced the same problem and solved it with a workaround. I am posting it here as it might help others coming here.

    instead of select dp , use

    select new 
    {
    a = v.a
    b = v.b
    }.
    

    This will not return duplicates.

提交回复
热议问题