hello ,
i had made two table as below
SELECT TOP 1000 [id]
,[Datetpublish]
,[statusid]
,[Title]
,[Author]
,[Content1]
FROM [blogstatus].[dbo].[Blogstatus]
SELECT TOP 1000 [statusid]
,[blogstatusname]
FROM [blogstatus].[dbo].[statusname]
in Index controller page
using (ctx = new blogstatusEntities1())
{
var publish = (from d in ctx.Blogstatus
join m in ctx.statusnames on d.statusid equals m.statusid
where m.statusid == 1
select new
{
id = d.id,
Datetpublish = d.Datetpublish,
Title = d.Title,
Author = d.Author,
Content1 = d.Content1
}).ToList();
return View(publish);
}
in view page
@using blogwithstatus.Models
@{
ViewBag.Title = "Index";
}
Blog news
list of blog
@using (var ctx = new blogstatusEntities1())
{
foreach (var blog in ctx.Blogstatus)
{
@blog.Title
Author| @blog.Author
have u check my query in controller ? and i did wrong any query? please fix these query with ef

Piyush PansuriyaRank #454 · 5.5K reputationPosted Jan 2, 2019, 8:39 PM EST
Piyush PansuriyaRank #454 · 5.5K reputationPosted Jan 2, 2019, 9:11 PM EST
Hello,
First check in controller, put break point here : return View(publish);
Is it returns data in publish or not?
Than, in your view page
sonal malhotraRank #4,317 · 351 reputationPosted Jan 2, 2019, 8:59 PM EST
sonal malhotraRank #4,317 · 351 reputationPosted Jan 2, 2019, 10:55 PM EST