7
Answers

limit number of rows in EF in mvc

sonal malhotra

sonal malhotra

6y
4.3k
1
hello sir ,
 
  i am new beginner in Ef  .can u write query syntax for us  in .net  ?  how to limit no of  records in ef
 
var commennt1 = (from b in ctx.Blogstatus
join c in ctx.CommentTables on b.id equals c.id_blog
select new
{
CommentMsg = c.CommentMsg,
CreatedBy = c.CreatedBy,
id = b.id
}).ToList().Select(y => new CommentTable
{
CommentMsg = y.CommentMsg,
CreatedBy = y.CreatedBy,
}
).ToList();
ViewBag.totalcomment3s = commennt1;
Answers (7)