예제 #1
0
        /// <summary>
        /// Constructor, parses values from query string
        /// </summary>
        /// <param name="HttpContextAccessor"></param>
        //============================================================
        //Revision History
        //Date        Author          Description
        //06/28/2017  TB               Created
        //============================================================
        public QueryParams(IHttpContextAccessor HttpContextAccessor)
        {
            IQueryCollection qc = HttpContextAccessor.HttpContext.Request.Query;

            Take       = qc.GetAsInt("take");
            Skip       = qc.GetAsInt("skip");
            NeedsTotal = qc.GetAsBool("needsTotal");
            QueryName  = qc["queryName"].ToString();

            Sort   = qc.GetAsTyped <QuerySort>("sort");
            Filter = qc.GetAsList <QueryFilter>("filter");
        }