Quantcast
Viewing latest article 5
Browse Latest Browse All 9386

Order by in Entity framework in mutliple table

Hello All,

we are trying to add dynamic Order by different column in multiple tables. we will get column name and have to sort data.
for example I want sort Department.Name or Staff=> JoiningDate . I tried different options and didn't work. not sure how to implement.

Below mentioned column need to sort.
Column Name: Department => Name
Column Name: Staff=> JoiningDate

public void getDepartment(String orderBy){
_context.Get<Department>() .Include(department => department.Staff);
}

Viewing latest article 5
Browse Latest Browse All 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>