private TextSearchFilter CreateFilter(int?usersPerPage = null) { var filter = new TextSearchFilter { NotOlderThen = UseStartDate ? NotOlderThen.ToUniversalTime() : (DateTime?)null, Upto = UseEndDate ? UpTo.ToUniversalTime() : (DateTime?)null, Contains = !string.IsNullOrEmpty(SearchText) ? SearchText : null, Take = usersPerPage, Skip = usersPerPage != null ? (CurrentPageIndex - 1) * usersPerPage : null, }; return(filter); }
private TextSearchFilter CreateFilter(int?itemsPerPage = null) { var filter = new TextSearchFilter { NotOlderThen = UseStartDate ? StartDate.Date.ToUniversalTime() : (DateTime?)null, Upto = UseEndDate ? EndDate.Date.AddDays(1).ToUniversalTime() : (DateTime?)null, Contains = !string.IsNullOrEmpty(ContainsText) ? ContainsText : null, Take = itemsPerPage, Skip = itemsPerPage != null ? (CurrentPageIndex - 1) * itemsPerPage : null, }; return(filter); }