Beispiel #1
0
        public static async Task <QueryResult <Alert> > QueryAlerts(
            this AppDbContext db,
            string page,
            string pageSize,
            string search,
            string sort
            )
        {
            var container = new QueryContainer <Alert>(
                db.Alerts,
                page, pageSize, search, sort
                );

            return(await container.Query((alerts, s) => alerts.Search(s)));
        }
        public static async Task <QueryResult <Item> > QueryItems(
            this AppDbContext db,
            string page,
            string pageSize,
            string search,
            string sort
            )
        {
            var container = new QueryContainer <Item>(
                db.Items.SetIncludes(),
                page,
                pageSize,
                search,
                sort
                );

            return(await container.Query((items, s) => items.Search(s)));
        }