0
sai kovvuri created
Hello ,
If we have an entity class A and it has a property of type entity class B. On the DTO back out to view, how do we provide capability to sort on non-key fields of class B. By default, sorting/flitering works if the user sorts/filter on a column that exists on entity A, but not on entity class B.
Thanks, Sai
3 Answer(s)
-
0
Hi,
This is actually not related to ABP. So, you may find better answers on Stackoverflow. Have you tried to create a LINQ with join and order by ?
-
0
Thanks . I figured it out
if class B looks like public class B { public string Name {get; set;} }
public class A { public B B1 {get; set;} }
set ISortedResultRequest.Sorting = "B1.Name ASC" , thebackend is able to add that to the query
-
0
Thanks @Sai Kovvuri. This worked for me also