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

@@SR["@Model.ViewName"]

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

@Model.ViewDataTypeShortName

@:
@:
foreach (PropertyMetadata property in Model.ModelMetadata.Properties) { if (property.Scaffold) { if (property.IsPrimaryKey) { @: continue; } if (property.IsReadOnly) { continue; } if (property.IsForeignKey) { @:
@: @:
@: @: @:
@:
continue; } bool isCheckbox = property.TypeName.Equals("System.Boolean"); if (isCheckbox) { @:
@:
@:
@: @: @:
@:
@:
} else if (property.IsEnum && !property.IsEnumFlags) { @:
@: @:
@: @: @:
@:
} else { @:
@: @:
@: @: @:
@:
} } } }
@@SR["Back to List"]
@{ if (Model.ReferenceScriptLibraries && (Model.IsLayoutPageSelected || Model.IsPartialView)) { @:@@section Scripts { @: @: @: @:} } // The following code closes the tag used in the case of a view using a layout page and the body and html tags in the case of a regular view page if (!Model.IsPartialView && !Model.IsLayoutPageSelected) { if (Model.ReferenceScriptLibraries) { @:@@section Scripts { @: @: @: @:} //ClearIndent(); } @: @: } } @functions { string GetAssociationName(PropertyMetadata property) { //Todo: Implement properly. return property.PropertyName; } }