Beispiel #1
0
        public async Task <string> GetPosts([FromQuery] int page, [FromQuery] int pageSize)
        {
            var(Posts, TotalCount) = await _context.GetPostsAndCountAsync(page, pageSize);

            return(JsonConvert.SerializeObject(new { Posts, TotalCount }, ControllersServices.JsonSettings));
        }