Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Member
312 Points
192 Posts
Apr 05, 2011 08:22 AM|LINK
thank you.
the list is returning the correct amount, but they're not being passed to the view for some reason.
the view is
model IEnumerable<iliteratimvc.Models.Manuscript> @{ ViewBag.Title = "RecentMSS"; Layout = "~/Views/Shared/_Layout.cshtml"; } <h2>Manuscripts</h2> @foreach (var m in Model) { <li>@m.MsTitle, @m.MsDescription </li> }
and the controller/linq code is
public ActionResult RecentMSS() { var rmss = (from m in ilitAuth.Manuscripts select m); rmss.ToList(); return View(rmss); }
somehow the rmss list is being populated, but the view is not.
dcgate
Member
312 Points
192 Posts
Re: entity type has no key defined error - help please!
Apr 05, 2011 08:22 AM|LINK
thank you.
the list is returning the correct amount, but they're not being passed to the view for some reason.
the view is
model IEnumerable<iliteratimvc.Models.Manuscript> @{ ViewBag.Title = "RecentMSS"; Layout = "~/Views/Shared/_Layout.cshtml"; } <h2>Manuscripts</h2> @foreach (var m in Model) { <li>@m.MsTitle, @m.MsDescription </li> }and the controller/linq code is
public ActionResult RecentMSS() { var rmss = (from m in ilitAuth.Manuscripts select m); rmss.ToList(); return View(rmss); }somehow the rmss list is being populated, but the view is not.
I'll always mark as answer when you help me - and if I can help you please do the same :)