@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(" ");
}
@:
@{
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;
}
}