-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add in info message for all index properties unmapped.
Update error to only apply if there's a mixture of mapped and unmapped. Updating IndexAttributeConvention back to throw instead of logging.
- Loading branch information
Showing
18 changed files
with
345 additions
and
313 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
// Copyright (c) .NET Foundation. All rights reserved. | ||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. | ||
|
||
using System; | ||
using System.Collections.Generic; | ||
using System.Diagnostics; | ||
using JetBrains.Annotations; | ||
using Microsoft.EntityFrameworkCore.Metadata; | ||
|
||
namespace Microsoft.EntityFrameworkCore.Diagnostics | ||
{ | ||
/// <summary> | ||
/// A <see cref="DiagnosticSource" /> event payload class for | ||
/// the events involving an invalid index. | ||
/// </summary> | ||
public class IndexEventData : EventData | ||
{ | ||
/// <summary> | ||
/// Constructs the event payload for events involving an invalid index. | ||
/// </summary> | ||
/// <param name="eventDefinition"> The event definition. </param> | ||
/// <param name="messageGenerator"> A delegate that generates a log message for this event. </param> | ||
/// <param name="entityType"> The entity type on which the index is defined. </param> | ||
/// <param name="indexName"> The name of the index. </param> | ||
/// <param name="indexPropertyNames"> The names of the properties which define the index. </param> | ||
public IndexEventData( | ||
[NotNull] EventDefinitionBase eventDefinition, | ||
[NotNull] Func<EventDefinitionBase, EventData, string> messageGenerator, | ||
[NotNull] IEntityType entityType, | ||
[CanBeNull] string indexName, | ||
[NotNull] List<string> indexPropertyNames) | ||
: base(eventDefinition, messageGenerator) | ||
{ | ||
EntityType = entityType; | ||
Name = indexName; | ||
PropertyNames = indexPropertyNames; | ||
} | ||
|
||
/// <summary> | ||
/// The entity type on which the index is defined. | ||
/// </summary> | ||
public virtual IEntityType EntityType { get; } | ||
|
||
/// <summary> | ||
/// The name of the index. | ||
/// </summary> | ||
public virtual string Name { get; } | ||
|
||
/// <summary> | ||
/// The list of properties which define the index. | ||
/// </summary> | ||
public virtual List<string> PropertyNames { get; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 33 additions & 9 deletions
42
src/EFCore.Relational/Properties/RelationalStrings.Designer.cs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.