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;


Madan ShekarPosted Jan 30, 2019, 4:23 AM
In view level
@model List
foreach(var i in Model)
{
@i.CommentMsg
Puneet KankarPosted Jan 30, 2019, 3:36 AM