Skip to content

Commit

Permalink
Minor change for avoiding array creation in favor of enumerator.
Browse files Browse the repository at this point in the history
  • Loading branch information
gmcelhanon committed Dec 12, 2024
1 parent 4dbebe0 commit 7e8fda1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ IEnumerable<SelectColumn> GetSelectColumns(ResourceProperty resourceProperty)
if (entityProperty.IsSurrogateIdentifierUsage())
{
// For Descriptors, this returns Namespace/CodeValue, for Student/Staff/Parent it returns the UniqueId
var naturalIdentifyingPropertyNames = entityProperty.DefiningProperty.Entity.NaturalIdentifyingProperties().Select(p => p.PropertyName).ToArray();
var naturalIdentifyingPropertyNames = entityProperty.DefiningProperty.Entity.NaturalIdentifyingProperties()
.Select(p => p.PropertyName);

foreach (SelectColumn selectColumn in TrackedChangesSelectColumnHelpers
.GetSelectColumnsForSurrogateIdentifierUsage(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public static class TrackedChangesSelectColumnHelpers

public static IEnumerable<SelectColumn> GetSelectColumnsForSurrogateIdentifierUsage(
string entityPropertyName,
string[] naturalIdentifyingPropertyNames,
IEnumerable<string> naturalIdentifyingPropertyNames,
IDatabaseNamingConvention namingConvention)
{
var allTerms = SplitTerms(entityPropertyName);
Expand Down

0 comments on commit 7e8fda1

Please sign in to comment.