i used below code to fill my gridview but i need sorting gridview . How can i do that in Ado.net enttiy framework? (Sorting gridview if filling gridview with ado.net entity )
void LoadStaffPersonel()
{
int selectedDepartman = Convert.ToInt32(Request.QueryString["SelectedDepartmanID"]);
string name = "";
using (staffContext = new StaffManagementEntities())
{
name = staffContext.Departman.Where(d => d.ID == selectedDepartman).First().Name;
ObjectResult<StaffsPersonel> personalData = staffContext.GetPersonelData(name);
gvPersonel.DataSource = personalData.ToList();
gvPersonel.DataBind();
}
}