@model Recepie.Models.Recipe @{ ViewData["Title"] = "Recipe Details"; }

@Model.Title

@Model.Description

@* Temporarily disabled for main page performance @if (Model.RecipeImage?.ImageData != null) {
Recipe Image
@Model.Title
} *@
Recipe Image
@Model.Title
@if (!string.IsNullOrEmpty(Model.Difficulty)) {
Difficulty: @Model.Difficulty
} @if (!string.IsNullOrEmpty(Model.Time)) {
Time: @Model.Time
} @if (Model.RecipeIngredients.Any()) {
Ingredients
    @foreach (var recipeIngredient in Model.RecipeIngredients.OrderBy(ri => ri.Ingredient.Name)) {
  • @if (!string.IsNullOrEmpty(recipeIngredient.Amount)) { @recipeIngredient.Amount } @if (!string.IsNullOrEmpty(recipeIngredient.Measurement)) { @recipeIngredient.Measurement } @recipeIngredient.Ingredient?.Name
  • }
} @if (Model.RecipeSteps.Any()) {
Instructions
    @foreach (var step in Model.RecipeSteps.OrderBy(s => s.StepNumber)) {
  1. @step.Text
  2. }
} @if (!string.IsNullOrEmpty(Model.Url)) { }
Actions
@if (!string.IsNullOrEmpty(Model.Url)) { View Recipe } Edit Recipe Delete Recipe Back to List
@if (Model.IngredientNames.Any()) {
Quick Filter by Ingredients
@foreach (var ingredient in Model.IngredientNames.Take(5)) { Find recipes with @ingredient }
}