public void OnGet() { // _context.MemoryOptimizedPosts.Take(20).ToList(); _context.PostComments.FromSqlRaw("[dbo].[usp_GetPostComments]").ToList(); Posts = _context.Posts.Take(20).ToList(); Posts = _context.GetAllTop20Posts(); var query = from p in _context.Posts join c in _context.Comments on p.Id equals c.PostId select new PostComments { Body = p.Body, Id = p.Id, OwnerUserId = p.OwnerUserId, Text = c.Text, Score = c.Score }; query.TagWith("using linq").Take(20).ToList(); _context.PostComments.TagWith("with view").Take(20).ToList(); }
public void Take20_CompiledQuery() { _context.GetAllTop20Posts(); }