예제 #1
0
        public async Task <BuildsModel> ListBuilds([FromQuery, Required] BuildsQueryParams query)
        {
            var(builds, hasMore, totalCount) = await _buildService.GetBuilds(
                (query.Page, BuildsQueryParams.PageSize),
                (query.SortField, query.SortDirection),
                query.Tags ?? Array.Empty <string>(),
                query.Search,
                query.Version,
                null);

            return(builds.ToViewModel(Url, query, hasMore, totalCount));
        }
예제 #2
0
 public static BuildsLinks BuildLinks(this IUrlHelper urlHelper, IEnumerable <Build> builds, BuildsQueryParams query, bool hasMore) =>