@inherits Microsoft.Extensions.CodeGeneration.Templating.RazorTemplateBase @using Microsoft.Extensions.CodeGeneration.EntityFramework @@model @Model.ViewDataTypeName @{ if (Model.IsPartialView) { } else if (Model.IsLayoutPageSelected) { @:@@{ @:ViewData["Title"] = @@Model.ViewName; if (!string.IsNullOrEmpty(Model.LayoutPageFile)) { @:Layout = "@Model.LayoutPageFile"; } @:} @: @:

@@Model.ViewName

@: } else { @:@@{ @:Layout = "null"; @:} @: @: @: @: @: @: @:@@@Model.ViewName @: @: @: // PushIndent(" "); } }

@AreYourSureYouWantToDeleteThis

@@@Model.ViewDataTypeShortName


@{ foreach (var property in Model.ModelMetadata.Properties) { if (property.Scaffold && !property.IsPrimaryKey && !property.IsForeignKey) {
@@Html.DisplayNameFor(model => model.@GetValueExpression(property))
@@Html.DisplayFor(model => model.@GetValueExpression(property))
} } @:
@: @:
@:
@: | @:Back to List @:
@:
@:
if (!Model.IsPartialView && !Model.IsLayoutPageSelected) { //ClearIndent(); @: @: } } @functions { string GetValueExpression(PropertyMetadata property) { //Todo: Get the association for the property and use that. return property.PropertyName; } }