Show correct missing key name in NoContextType error message

This commit is contained in:
andrewjsaid 2018-01-09 15:34:07 +01:00
parent f90337c1a6
commit b3531b23b8
3 changed files with 3 additions and 3 deletions

View File

@ -12,7 +12,7 @@ namespace Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore.Internal
private static readonly Action<ILogger, Exception> _noContextType = LoggerMessage.Define(
LogLevel.Error,
new EventId(1, "NoContextType"),
"No context type was specified. Ensure the form data from the request includes a contextTypeName value, specifying the context to apply migrations for.");
"No context type was specified. Ensure the form data from the request includes a context value, specifying the context type name to apply migrations for.");
private static readonly Action<ILogger, string, Exception> _invalidContextType = LoggerMessage.Define<string>(
LogLevel.Error,

View File

@ -277,7 +277,7 @@ namespace Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore
=> string.Format(CultureInfo.CurrentCulture, GetString("MigrationsEndPointMiddleware_InvalidContextType"), p0);
/// <summary>
/// No context type was specified. Ensure the form data from the request includes a contextTypeName value, specifying the context to apply migrations for.
/// No context type was specified. Ensure the form data from the request includes a context value, specifying the context type name to apply migrations for.
/// </summary>
internal static string MigrationsEndPointMiddleware_NoContextType
{

View File

@ -175,7 +175,7 @@
<value>The context type '{0}' could not be loaded. Ensure this is the correct type name for the context you are trying to apply migrations for.</value>
</data>
<data name="MigrationsEndPointMiddleware_NoContextType" xml:space="preserve">
<value>No context type was specified. Ensure the form data from the request includes a contextTypeName value, specifying the context to apply migrations for.</value>
<value>No context type was specified. Ensure the form data from the request includes a context value, specifying the context type name to apply migrations for.</value>
</data>
<data name="DatabaseErrorPage_Title" xml:space="preserve">
<value>A database operation failed while processing the request.</value>