Exemple #1
0
        public async Task <IActionResult> GetServerTime()
        {
            return(await CProxy.Using(() =>
            {
                return new OkObjectResult(new
                {
                    success = true,
                    message = "",

                    result = UnixTime.LocalNow
                });
            }));
        }
Exemple #2
0
        public async Task <IActionResult> GetAnalysis()
        {
            return(await CProxy.Using(() =>
            {
                var _result = __db_context.TbLionAnalysis
                              .OrderByDescending(w => w.SequenceNo)
                              .ToList();

                return new OkObjectResult(new
                {
                    success = true,
                    message = "",

                    result = _result
                });
            }));
        }
Exemple #3
0
        public async Task <IActionResult> GetWinnersWithPage(int pageIndex, int pageRows)
        {
            return(await CProxy.Using(() =>
            {
                var _result = __db_context.TbLionWinner
                              .OrderByDescending(w => w.SequenceNo)
                              .Skip((pageIndex - 1) * pageRows).Take(pageRows)
                              .ToList();

                return new OkObjectResult(new
                {
                    success = true,
                    message = "",

                    result = _result
                });
            }));
        }
Exemple #4
0
        public async Task <IActionResult> GetVersion()
        {
            return(await CProxy.Using(() =>
            {
                if (__version == null)
                {
                    __version = new ProductInfo("LottoLion-WebApi", "v1.0.0", "webapi service for LottoLion", ProductType.service);
                }

                return new OkObjectResult(new
                {
                    success = true,
                    message = "",

                    result = __version
                });
            }));
        }