@using System @using System.Linq @using JetBrains.Annotations; @using Microsoft.AspNet.Diagnostics.Entity @using Microsoft.AspNet.Diagnostics.Entity.Utilities; @using Microsoft.AspNet.Diagnostics.Entity.Views @{ Response.StatusCode = 500; // TODO: Response.ReasonPhrase = "Internal Server Error"; Response.ContentType = "text/html"; Response.ContentLength = null; // Clear any prior Content-Length } @functions { private DatabaseErrorPageModel _model; public virtual DatabaseErrorPageModel Model { get { return _model; } [param: NotNull] set { Check.NotNull(value, "value"); _model = value; } } } Internal Server Error

@Strings.DatabaseErrorPage_Title

@if (Model.Options.ShowExceptionDetails) {

@for (Exception ex = Model.Exception; ex != null; ex = ex.InnerException) { @ex.GetType().Name: @ex.Message
}


} @if (!Model.DatabaseExists && !Model.PendingMigrations.Any()) {

@Strings.FormatDatabaseErrorPage_NoDbOrMigrationsTitle(Model.ContextType.Name)

@Strings.DatabaseErrorPage_NoDbOrMigrationsInfo

@Strings.DatabaseErrorPage_AddMigrationCommand
@Strings.DatabaseErrorPage_ApplyMigrationsCommand
} else if (Model.PendingMigrations.Any()) {

@Strings.FormatDatabaseErrorPage_PendingMigrationsTitle(Model.ContextType.Name)

@Strings.FormatDatabaseErrorPage_PendingMigrationsInfo(Model.ContextType.Name)

@if (Model.Options.ListMigrations) { }

@Strings.DatabaseErrorPage_HowToApplyFromCmd

@Strings.DatabaseErrorPage_ApplyMigrationsCommand
} else if (Model.PendingModelChanges) {

@Strings.FormatDatabaseErrorPage_PendingChangesTitle(Model.ContextType.Name)

@Strings.DatabaseErrorPage_PendingChangesInfo

@Strings.DatabaseErrorPage_AddMigrationCommand
@Strings.DatabaseErrorPage_ApplyMigrationsCommand
}