| | | 1 | | namespace RoleRadar.Application.Reading; |
| | | 2 | | |
| | | 3 | | using System.Linq; |
| | | 4 | | using RoleRadar.Application.Reading.Models; |
| | | 5 | | |
| | | 6 | | public static class ApplicationOrderingExtensions |
| | | 7 | | { |
| | | 8 | | public static IOrderedQueryable<ApplicationReadModel> OrderByFirstResponse(this IQueryable<ApplicationReadModel> sou |
| | 54 | 9 | | => descending |
| | 54 | 10 | | ? source.OrderByDescending(p => p.HasFirstResponse).ThenByDescending(p => p.FirstResponseAt) |
| | 54 | 11 | | : source.OrderByDescending(p => p.HasFirstResponse).ThenBy(p => p.FirstResponseAt); |
| | | 12 | | |
| | | 13 | | public static IOrderedQueryable<ApplicationReadModel> ThenByFirstResponse(this IOrderedQueryable<ApplicationReadMode |
| | 0 | 14 | | => descending |
| | 0 | 15 | | ? source.ThenByDescending(p => p.HasFirstResponse).ThenByDescending(p => p.FirstResponseAt) |
| | 0 | 16 | | : source.ThenByDescending(p => p.HasFirstResponse).ThenBy(p => p.FirstResponseAt); |
| | | 17 | | |
| | | 18 | | public static IOrderedQueryable<ApplicationReadModel> OrderByLastEvent(this IQueryable<ApplicationReadModel> source, |
| | 28 | 19 | | => descending |
| | 28 | 20 | | ? source.OrderByDescending(p => p.HasLastEvent).ThenByDescending(p => p.LastEventAt) |
| | 28 | 21 | | : source.OrderByDescending(p => p.HasLastEvent).ThenBy(p => p.LastEventAt); |
| | | 22 | | |
| | | 23 | | public static IOrderedQueryable<ApplicationReadModel> ThenByLastEvent(this IOrderedQueryable<ApplicationReadModel> s |
| | 0 | 24 | | => descending |
| | 0 | 25 | | ? source.ThenByDescending(p => p.HasLastEvent).ThenByDescending(p => p.LastEventAt) |
| | 0 | 26 | | : source.ThenByDescending(p => p.HasLastEvent).ThenBy(p => p.LastEventAt); |
| | | 27 | | } |