Esempio n. 1
0
        public dynamic Execute(dynamic parameters, global::Nancy.INancyModule module)
        {
            module.RequiresAuthentication();

            using (ITransaction transaction = _store.BeginTransaction())
            {
                int feedId = int.Parse(parameters.id);

                return(transaction.Query <IFeedConfiguration>().Where("FeedId = @feedId").Parameter("feedId", feedId).First());
            }
        }
        public dynamic Execute(dynamic parameters, global::Nancy.INancyModule module)
        {
            module.RequiresAuthentication();

            using (ITransaction transaction = _store.BeginTransaction())
            {
                var model = new FeedPackageCountStatistic(transaction).GetModel();

                return(model);
            }
        }
Esempio n. 3
0
        public dynamic Execute(dynamic parameters, global::Nancy.INancyModule module)
        {
            module.RequiresAuthentication();

            using (ITransaction transaction = _store.BeginTransaction())
            {
                var feedsCount    = transaction.Query <IFeed>().Count();
                var usersCount    = transaction.Query <User>().Count();
                var packagesCount = transaction.Query <IInternalPackage>().Count();

                return(new
                {
                    feedCount = feedsCount,
                    userCount = usersCount,
                    packageCount = packagesCount
                });
            }
        }
Esempio n. 4
0
        public dynamic Execute(dynamic parameters, global::Nancy.INancyModule module)
        {
            module.RequiresAuthentication();

            return(null);
        }