public IActionResult Get()
        {
            Db.Connection.Open();
            var query  = new BlogPostQuery(Db);
            var result = query.LatestPostsAsync();

            return(new OkObjectResult(result));
        }
        public async Task <IActionResult> GetLatest()
        {
            await Db.Connection.OpenAsync();

            var query  = new BlogPostQuery(Db);
            var result = await query.LatestPostsAsync();

            return(new OkObjectResult(result));
        }
        public async Task <IActionResult> GetLatest()
        {
            using (var db = new AppDb())
            {
                await db.Connection.OpenAsync();

                var query  = new BlogPostQuery(db);
                var result = await query.LatestPostsAsync();

                return(new OkObjectResult(result));
            }
        }