Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagec#
return employments
    .Where(a => a.EmploymentState.Id != (uint)CoreIdentityEmploymentStates.Deleted)
    .OrderByDescending(a => a.EmploymentState.Id)
    .ThenByDescending(a => a.MainEmployment)
    .ThenByDescending(a => a.ValidFrom <= DateTime.Now && (!a.ValidTo.HasValue || a.ValidTo.Value >= DateTime.Now.Date))
    .ThenByDescending(a => a.Percentage)
    .ThenBy(a => a.ValidFrom)
    .ThenBy(a => a.ValidTo.HasValue)
    .ThenBy(a => a.ValidTo)
    .ThenBy(a => a.Id);

For further information there are also how-tos related to this topic:

https://itsense.atlassian.net/l/cp/21118Xwy