示例#1
0
        public async Task <IActionResult> GetQuickTrackAsync()
        {
            await _db.Connection.OpenAsync();

            var query  = new QuickTrackQuery(_db);
            var result = await query.LatestPostsAsync();

            return(new OkObjectResult(result));
        }
示例#2
0
        public async Task <IActionResult> GetQuickTrackAsync(int id,
                                                             string job_date)
        {
            Console.Write("ID: " + id + ";JOBDATE:" + job_date);
            await _db.Connection.OpenAsync();

            var query  = new QuickTrackQuery(_db);
            var result = await query.FindOneAsync(id, job_date);

            if (result is null)
            {
                return(new NotFoundResult());
            }
            return(new OkObjectResult(result));
        }