@model IEnumerable @{ ViewBag.Title = "BlogPostConsultation"; }

Blog post for consultations.

@Html.ActionLink("Ask for Advice", "Create")

@foreach (var item in Model) { @* *@ @if (item.users_id == ViewBag.CurrentUserId) { } @if (item.users_id == ViewBag.CurrentUserId || item.users_id != ViewBag.CurrentUserId) { } }
@Html.DisplayNameFor(model => model.id) @Html.DisplayNameFor(model => model.user_name) @Html.DisplayNameFor(model => model.user_email) @Html.DisplayNameFor(model => model.consultation_title) @Html.DisplayNameFor(model => model.consultation_description) @Html.DisplayNameFor(model => model.consultation_date)
@Html.DisplayFor(modelItem => item.id) @Html.DisplayFor(modelItem => item.user_name) @Html.DisplayFor(model => item.user_email) @Html.DisplayFor(modelItem => item.consultation_title) @Html.DisplayFor(modelItem => item.consultation_description) @Html.DisplayFor(modelItem => item.consultation_date) @Html.ActionLink("Edit", "Edit", new { id = item.id }) | @Html.ActionLink("Answers", "Details", new { id = item.id }) | @Html.ActionLink("Delete", "Delete", new { id = item.id }) @Html.ActionLink("Edit", "Edit", new { id = item.id }) @Html.ActionLink("Delete", "Delete", new { id = item.id }) @Html.ActionLink("Answers", "Details", new { id = item.id })