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;