Merge pull request #431 from andrewjsaid/dev

Show correct missing key name in NoContextType error message
This commit is contained in:
Arthur Vickers 2018-08-08 10:28:15 -07:00 committed by GitHub
commit 6b09fa4e86
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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( private static readonly Action<ILogger, Exception> _noContextType = LoggerMessage.Define(
LogLevel.Error, LogLevel.Error,
new EventId(1, "NoContextType"), 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>( private static readonly Action<ILogger, string, Exception> _invalidContextType = LoggerMessage.Define<string>(
LogLevel.Error, LogLevel.Error,

View File

@ -277,7 +277,7 @@ namespace Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore
=> string.Format(CultureInfo.CurrentCulture, GetString("MigrationsEndPointMiddleware_InvalidContextType"), p0); => string.Format(CultureInfo.CurrentCulture, GetString("MigrationsEndPointMiddleware_InvalidContextType"), p0);
/// <summary> /// <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> /// </summary>
internal static string MigrationsEndPointMiddleware_NoContextType 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> <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>
<data name="MigrationsEndPointMiddleware_NoContextType" xml:space="preserve"> <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>
<data name="DatabaseErrorPage_Title" xml:space="preserve"> <data name="DatabaseErrorPage_Title" xml:space="preserve">
<value>A database operation failed while processing the request.</value> <value>A database operation failed while processing the request.</value>