コード例 #1
0
        private static T GetFilter <T>(RecentInfoFilterRequest filterRequest)
            where T : RecentInfoFilter, new()
        {
            var filter = new T
            {
                ContributedAfter = DateTime.Today.AddDays(-filterRequest.Days),
                ContributedBy    = !string.IsNullOrEmpty(filterRequest.ContributedBy) ? new[] { filterRequest.ContributedBy } : null,
                Agencies         = filterRequest.Agencies
            };

            return(filter);
        }
コード例 #2
0
 public List <RecentProperty> GetProperty(RecentInfoFilterRequest filterRequest)
 {
     return(_recentInfoQueryService.GetProperty(GetFilter <RecentPropertyFilter>(filterRequest)).OrderBy(p => p.Description).ToList());
 }
コード例 #3
0
 public List <RecentPerson> GetPeople(RecentInfoFilterRequest filterRequest)
 {
     return(_recentInfoQueryService.GetPeople(GetFilter <RecentPersonFilter>(filterRequest)).OrderBy(p => p.LastName).ToList());
 }
コード例 #4
0
 public List <RecentVehicle> GetVehicles(RecentInfoFilterRequest filterRequest)
 {
     return(_recentInfoQueryService.GetVehicles(GetFilter <RecentVehicleFilter>(filterRequest)).OrderBy(v => v.PlateNumber).ToList());
 }
コード例 #5
0
 public List <RecentEvent> GetEvents(RecentInfoFilterRequest filterRequest)
 {
     return(_recentInfoQueryService.GetEvents(GetFilter <RecentEventFilter>(filterRequest))); // ordered desc by DateContributed
 }