﻿@model PhotoLife.ViewModels.News.NewsDetailsViewModel

@{
    ViewBag.Title = "NewsDetails";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>NewsDetails</h2>

<div>
    <h4>NewsDetailsViewModel</h4>
    <hr />
    <dl class="dl-horizontal">
        <dt>
            @Html.DisplayNameFor(model => model.Title)
        </dt>

        <dd>
            @Html.DisplayFor(model => model.Title)
        </dd>

        <dt>
            @Html.DisplayNameFor(model => model.Text)
        </dt>

        <dd>
            @Html.DisplayFor(model => model.Text)
        </dd>

        <dt>
            @Html.DisplayNameFor(model => model.ImageUrl)
        </dt>

        <dd>
            @Html.DisplayFor(model => model.ImageUrl)
        </dd>

        <dt>
            @Html.DisplayNameFor(model => model.DatePublished)
        </dt>

        <dd>
            @Html.DisplayFor(model => model.DatePublished)
        </dd>

        <dt>
            @Html.DisplayNameFor(model => model.Views)
        </dt>

        <dd>
            @Html.DisplayFor(model => model.Views)
        </dd>

    </dl>
</div>
<p>
    @Html.ActionLink("Edit", "Edit", new { id = Model.Id }) |
    @Html.ActionLink("Back to List", "Index")
</p>

﻿@model PhotoLife.ViewModels.News.NewsDetailsViewModel

@{
    ViewBag.Title = "NewsDetails";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>NewsDetails</h2>

<div>
    <h4>NewsDetailsViewModel</h4>
    <hr />
    <dl class="dl-horizontal">
        <dt>
            @Html.DisplayNameFor(model => model.Title)
        </dt>

        <dd>
            @Html.DisplayFor(model => model.Title)
        </dd>
        
        <dt>
            @Html.DisplayNameFor(model => model.ImageUrl)
        </dt>

        <dd>
            @Html.DisplayFor(model => model.ImageUrl)
        </dd>

        <dt>
            @Html.DisplayNameFor(model => model.DatePublished)
        </dt>

        <dd>
            @Html.DisplayFor(model => model.DatePublished)
        </dd>

        <dt>
            @Html.DisplayNameFor(model => model.Views)
        </dt>

        <dd>
            @Html.DisplayFor(model => model.Views)
        </dd>

    </dl>
</div>

@Html.Raw(HttpUtility.HtmlDecode(Model.Text))

<p>
    @Html.ActionLink("Edit", "Edit", new { id = Model.Id }) |
    @Html.ActionLink("Back to List", "Index")
</p>

Add view for news details route
Add view for news details route
