Example #1
0
        public PagedMetaModel(PagedResponseModel <TResponse> pagedResponseModel) : this()
        {
            _pagedResponseModel = pagedResponseModel;

            Total = pagedResponseModel.Total;

            Items = pagedResponseModel.Items;

            AdditionalData = pagedResponseModel.AdditionalData;
        }
Example #2
0
        public PagedMetaModel(IUrlHelper urlHelper, TRequest pagedRequestModel, PagedResponseModel <TResponse> pagedResponseModel, HttpMethod method = HttpMethod.GET) : this(pagedResponseModel)
        {
            _pagedRequestModel = pagedRequestModel;

            _method = method;

            _endpoint = urlHelper.ActionContext.HttpContext.Request.Path.Value;

            _endpoint = urlHelper.AbsoluteContent(_endpoint);

            Meta = GetMetaLink();

            First = GetFirstLink();

            Previous = GetPreviousLink();

            Next = GetNextLink();

            Last = GetLastLink();
        }