Move home controller to EF context.

This commit is contained in:
2018-08-06 00:26:30 +01:00
parent bfbb203888
commit ab24e794c3
3 changed files with 12 additions and 4 deletions

View File

@@ -32,7 +32,8 @@
ViewData["Title"] = "Home Page";
}
@using System.IO
@model IEnumerable<News>
@using News = Cicm.Database.Models.News
@model List<Cicm.Database.Models.News>
<h2>News</h2>
@@ -46,6 +47,8 @@
</td>
</tr>
<tr>
News items not yet implemented!
@* // TODO
@if(news.Image != null && File.Exists(System.IO.Path.Combine(ViewBag.WebRootPath, news.Image + ".jpg")))
{
<td height="128"
@@ -77,6 +80,7 @@
@news.SubText
</a>
</td>
*@
</tr>
</table>
<br />