I have an employee form for editing or displaying personal information in my project using ASP.NET MVC5, this form receives Idand displays information about the employee.
In this form, I must have a button Nextand Previousso that the administrator can go to the next or previous employee (if there is no employee, the button must be disabled). On the other hand, this form has a sort variable that is set by Admin.
So, I want to put two tags <a />with the next and previous employee ID associated with the employee form.
<< Previous employee Id by sorting Next employee Id by sorting >>
I know how to get the current employee, it is quite easy in the Entity Framework.
But how can I get the next and previous identifier of the current identifier with Entity Framework?
source
share