Skip to content

Commit 6956bbd

Browse files
committed
Pivot to property-level IsHidden API per review feedback
Addresses feedback on PR #38225: - roji #1: per-column HIDDEN configuration → IsHidden(bool) on TemporalPeriodPropertyBuilder + OwnedNavigationTemporalPeriodPropertyBuilder lets users hide the start and end columns independently. - roji #2: HIDDEN as a property facet rather than a temporal-specific entity setting → new SqlServerAnnotationNames.IsHidden plus SqlServerPropertyExtensions IsHidden / SetIsHidden / GetIsHiddenConfigurationSource (mirroring IsSparse). PeriodColumnsHidden(bool) is preserved on TemporalTableBuilder as a convenience that calls SetIsHidden on both period properties. - Copilot bug: convert-to-temporal path was always emitting ALTER COLUMN ... ADD HIDDEN. Two new table-level annotations TemporalPeriodStartHidden / TemporalPeriodEndHidden are emitted by SqlServerAnnotationProvider.For(ITable) when a period property is configured visible. BuildTemporalInformationFromMigrationOperation reads them into TemporalOperationInformation, and EnablePeriod skips the ADD HIDDEN ALTER COLUMN operations when the column is configured visible. - New functional test Convert_normal_table_to_temporal_with_visible_period_columns asserts the ADD HIDDEN operations are omitted. - Snapshot generator chains .IsHidden(false) onto the period property fluent call when the column is configured visible. - Removed entity-level TemporalPeriodColumnsHidden annotation and the IsTemporalPeriodColumnsHidden / SetIsTemporalPeriodColumnsHidden / GetIsTemporalPeriodColumnsHiddenConfigurationSource entity extensions. - Updated baseline.json accordingly.
1 parent 76554e0 commit 6956bbd

14 files changed

Lines changed: 336 additions & 133 deletions

src/EFCore.SqlServer/Design/Internal/SqlServerAnnotationCodeGenerator.cs

Lines changed: 32 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -148,9 +148,9 @@ private static readonly MethodInfo TemporalPropertyHasColumnNameMethodInfo
148148
= typeof(TemporalPeriodPropertyBuilder).GetRuntimeMethod(
149149
nameof(TemporalPeriodPropertyBuilder.HasColumnName), [typeof(string)])!;
150150

151-
private static readonly MethodInfo TemporalTablePeriodColumnsHiddenMethodInfo
152-
= typeof(TemporalTableBuilder).GetRuntimeMethod(
153-
nameof(TemporalTableBuilder.PeriodColumnsHidden), [typeof(bool)])!;
151+
private static readonly MethodInfo TemporalPropertyIsHiddenMethodInfo
152+
= typeof(TemporalPeriodPropertyBuilder).GetRuntimeMethod(
153+
nameof(TemporalPeriodPropertyBuilder.IsHidden), [typeof(bool)])!;
154154

155155
private static readonly MethodInfo ModelHasFullTextCatalogMethodInfo
156156
= typeof(SqlServerModelBuilderExtensions).GetRuntimeMethod(
@@ -375,27 +375,17 @@ public override IReadOnlyList<MethodCallCodeFragment> GenerateFluentApiCalls(
375375
: new MethodCallCodeFragment(TemporalTableUseHistoryTableMethodInfo2, historyTableName));
376376
}
377377

378-
// ttb => ttb.HasPeriodStart("Start").HasColumnName("ColumnStart")
378+
// ttb => ttb.HasPeriodStart("Start").HasColumnName("ColumnStart").IsHidden(false)
379+
// IsHidden(false) is only chained when the user explicitly configured the column visible —
380+
// the default is HIDDEN, so omitting matches the legacy snapshot output.
379381
temporalTableBuilderCalls.Add(
380-
periodStartColumnName != null
381-
? new MethodCallCodeFragment(TemporalTableHasPeriodStartMethodInfo, periodStartPropertyName)
382-
.Chain(new MethodCallCodeFragment(TemporalPropertyHasColumnNameMethodInfo, periodStartColumnName))
383-
: new MethodCallCodeFragment(TemporalTableHasPeriodStartMethodInfo, periodStartPropertyName));
382+
BuildPeriodPropertyCall(
383+
TemporalTableHasPeriodStartMethodInfo, periodStartPropertyName, periodStartColumnName, periodStartProperty));
384384

385-
// ttb => ttb.HasPeriodEnd("End").HasColumnName("ColumnEnd")
385+
// ttb => ttb.HasPeriodEnd("End").HasColumnName("ColumnEnd").IsHidden(false)
386386
temporalTableBuilderCalls.Add(
387-
periodEndColumnName != null
388-
? new MethodCallCodeFragment(TemporalTableHasPeriodEndMethodInfo, periodEndPropertyName)
389-
.Chain(new MethodCallCodeFragment(TemporalPropertyHasColumnNameMethodInfo, periodEndColumnName))
390-
: new MethodCallCodeFragment(TemporalTableHasPeriodEndMethodInfo, periodEndPropertyName));
391-
392-
// ttb => ttb.PeriodColumnsHidden(false)
393-
// Only emit when explicitly set to false; the default (true) matches legacy behavior.
394-
if (annotations.TryGetValue(SqlServerAnnotationNames.TemporalPeriodColumnsHidden, out var periodColumnsHiddenAnnotation)
395-
&& periodColumnsHiddenAnnotation.Value as bool? == false)
396-
{
397-
temporalTableBuilderCalls.Add(new MethodCallCodeFragment(TemporalTablePeriodColumnsHiddenMethodInfo, false));
398-
}
387+
BuildPeriodPropertyCall(
388+
TemporalTableHasPeriodEndMethodInfo, periodEndPropertyName, periodEndColumnName, periodEndProperty));
399389

400390
// ToTable(tb => tb.IsTemporal(ttb => { ... }))
401391
var toTemporalTableCall = new MethodCallCodeFragment(
@@ -415,10 +405,30 @@ public override IReadOnlyList<MethodCallCodeFragment> GenerateFluentApiCalls(
415405
annotations.Remove(SqlServerAnnotationNames.TemporalHistoryTableSchema);
416406
annotations.Remove(SqlServerAnnotationNames.TemporalPeriodStartPropertyName);
417407
annotations.Remove(SqlServerAnnotationNames.TemporalPeriodEndPropertyName);
418-
annotations.Remove(SqlServerAnnotationNames.TemporalPeriodColumnsHidden);
419408
}
420409

421410
return fragments;
411+
412+
static MethodCallCodeFragment BuildPeriodPropertyCall(
413+
MethodInfo hasPeriodMethod,
414+
string? periodPropertyName,
415+
string? periodColumnName,
416+
IReadOnlyProperty? periodProperty)
417+
{
418+
var call = new MethodCallCodeFragment(hasPeriodMethod, periodPropertyName);
419+
420+
if (periodColumnName != null)
421+
{
422+
call = call.Chain(new MethodCallCodeFragment(TemporalPropertyHasColumnNameMethodInfo, periodColumnName));
423+
}
424+
425+
if (periodProperty?.IsHidden() == false)
426+
{
427+
call = call.Chain(new MethodCallCodeFragment(TemporalPropertyIsHiddenMethodInfo, false));
428+
}
429+
430+
return call;
431+
}
422432
}
423433

424434
/// <summary>

src/EFCore.SqlServer/Design/Internal/SqlServerCSharpRuntimeAnnotationCodeGenerator.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ public override void Generate(IProperty property, CSharpRuntimeAnnotationCodeGen
6868
annotations.Remove(SqlServerAnnotationNames.IdentityIncrement);
6969
annotations.Remove(SqlServerAnnotationNames.IdentitySeed);
7070
annotations.Remove(SqlServerAnnotationNames.Sparse);
71+
annotations.Remove(SqlServerAnnotationNames.IsHidden);
7172

7273
if (!annotations.ContainsKey(SqlServerAnnotationNames.ValueGenerationStrategy))
7374
{
@@ -88,7 +89,7 @@ public override void Generate(IColumn column, CSharpRuntimeAnnotationCodeGenerat
8889
annotations.Remove(SqlServerAnnotationNames.Sparse);
8990
annotations.Remove(SqlServerAnnotationNames.TemporalIsPeriodStartColumn);
9091
annotations.Remove(SqlServerAnnotationNames.TemporalIsPeriodEndColumn);
91-
annotations.Remove(SqlServerAnnotationNames.TemporalPeriodColumnsHidden);
92+
annotations.Remove(SqlServerAnnotationNames.IsHidden);
9293
}
9394

9495
base.Generate(column, parameters);
@@ -172,7 +173,6 @@ public override void Generate(IEntityType entityType, CSharpRuntimeAnnotationCod
172173
annotations.Remove(SqlServerAnnotationNames.TemporalHistoryTableSchema);
173174
annotations.Remove(SqlServerAnnotationNames.TemporalPeriodEndPropertyName);
174175
annotations.Remove(SqlServerAnnotationNames.TemporalPeriodStartPropertyName);
175-
annotations.Remove(SqlServerAnnotationNames.TemporalPeriodColumnsHidden);
176176
}
177177

178178
base.Generate(entityType, parameters);
@@ -189,7 +189,8 @@ public override void Generate(ITable table, CSharpRuntimeAnnotationCodeGenerator
189189
annotations.Remove(SqlServerAnnotationNames.TemporalHistoryTableSchema);
190190
annotations.Remove(SqlServerAnnotationNames.TemporalPeriodEndColumnName);
191191
annotations.Remove(SqlServerAnnotationNames.TemporalPeriodStartColumnName);
192-
annotations.Remove(SqlServerAnnotationNames.TemporalPeriodColumnsHidden);
192+
annotations.Remove(SqlServerAnnotationNames.TemporalPeriodStartHidden);
193+
annotations.Remove(SqlServerAnnotationNames.TemporalPeriodEndHidden);
193194
}
194195

195196
base.Generate(table, parameters);

src/EFCore.SqlServer/EFCore.SqlServer.baseline.json

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,9 @@
215215
{
216216
"Member": "virtual Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationTemporalPeriodPropertyBuilder HasPrecision(int precision);"
217217
},
218+
{
219+
"Member": "virtual Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationTemporalPeriodPropertyBuilder IsHidden(bool hidden = true);"
220+
},
218221
{
219222
"Member": "override string? ToString();"
220223
}
@@ -1128,9 +1131,6 @@
11281131
{
11291132
"Member": "static Microsoft.EntityFrameworkCore.Metadata.ConfigurationSource? GetIsTemporalConfigurationSource(this Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType entityType);"
11301133
},
1131-
{
1132-
"Member": "static Microsoft.EntityFrameworkCore.Metadata.ConfigurationSource? GetIsTemporalPeriodColumnsHiddenConfigurationSource(this Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType entityType);"
1133-
},
11341134
{
11351135
"Member": "static string? GetPeriodEndPropertyName(this Microsoft.EntityFrameworkCore.Metadata.IReadOnlyEntityType entityType);"
11361136
},
@@ -1164,9 +1164,6 @@
11641164
{
11651165
"Member": "static bool IsTemporal(this Microsoft.EntityFrameworkCore.Metadata.IReadOnlyEntityType entityType);"
11661166
},
1167-
{
1168-
"Member": "static bool IsTemporalPeriodColumnsHidden(this Microsoft.EntityFrameworkCore.Metadata.IReadOnlyEntityType entityType);"
1169-
},
11701167
{
11711168
"Member": "static void SetHistoryTableName(this Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType entityType, string? historyTableName);"
11721169
},
@@ -1191,12 +1188,6 @@
11911188
{
11921189
"Member": "static bool? SetIsTemporal(this Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType entityType, bool? temporal, bool fromDataAnnotation = false);"
11931190
},
1194-
{
1195-
"Member": "static void SetIsTemporalPeriodColumnsHidden(this Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType entityType, bool? hidden);"
1196-
},
1197-
{
1198-
"Member": "static bool? SetIsTemporalPeriodColumnsHidden(this Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType entityType, bool? hidden, bool fromDataAnnotation = false);"
1199-
},
12001191
{
12011192
"Member": "static void SetPeriodEndPropertyName(this Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType entityType, string? periodEndPropertyName);"
12021193
},
@@ -2533,6 +2524,9 @@
25332524
{
25342525
"Member": "static Microsoft.EntityFrameworkCore.Metadata.ConfigurationSource? GetIdentitySeedConfigurationSource(this Microsoft.EntityFrameworkCore.Metadata.IConventionRelationalPropertyOverrides overrides);"
25352526
},
2527+
{
2528+
"Member": "static Microsoft.EntityFrameworkCore.Metadata.ConfigurationSource? GetIsHiddenConfigurationSource(this Microsoft.EntityFrameworkCore.Metadata.IConventionProperty property);"
2529+
},
25362530
{
25372531
"Member": "static Microsoft.EntityFrameworkCore.Metadata.ConfigurationSource? GetIsSparseConfigurationSource(this Microsoft.EntityFrameworkCore.Metadata.IConventionProperty property);"
25382532
},
@@ -2575,6 +2569,9 @@
25752569
{
25762570
"Member": "static bool IsCompatibleWithValueGeneration(Microsoft.EntityFrameworkCore.Metadata.IReadOnlyProperty property);"
25772571
},
2572+
{
2573+
"Member": "static bool? IsHidden(this Microsoft.EntityFrameworkCore.Metadata.IReadOnlyProperty property);"
2574+
},
25782575
{
25792576
"Member": "static bool? IsSparse(this Microsoft.EntityFrameworkCore.Metadata.IReadOnlyProperty property);"
25802577
},
@@ -2629,6 +2626,12 @@
26292626
{
26302627
"Member": "static long? SetIdentitySeed(this Microsoft.EntityFrameworkCore.Metadata.IConventionRelationalPropertyOverrides overrides, long? seed, bool fromDataAnnotation = false);"
26312628
},
2629+
{
2630+
"Member": "static void SetIsHidden(this Microsoft.EntityFrameworkCore.Metadata.IMutableProperty property, bool? hidden);"
2631+
},
2632+
{
2633+
"Member": "static bool? SetIsHidden(this Microsoft.EntityFrameworkCore.Metadata.IConventionProperty property, bool? hidden, bool fromDataAnnotation = false);"
2634+
},
26322635
{
26332636
"Member": "static void SetIsSparse(this Microsoft.EntityFrameworkCore.Metadata.IMutableProperty property, bool? sparse);"
26342637
},
@@ -3047,6 +3050,9 @@
30473050
{
30483051
"Member": "virtual Microsoft.EntityFrameworkCore.Metadata.Builders.TemporalPeriodPropertyBuilder HasPrecision(int precision);"
30493052
},
3053+
{
3054+
"Member": "virtual Microsoft.EntityFrameworkCore.Metadata.Builders.TemporalPeriodPropertyBuilder IsHidden(bool hidden = true);"
3055+
},
30503056
{
30513057
"Member": "override string? ToString();"
30523058
}

src/EFCore.SqlServer/Extensions/SqlServerEntityTypeExtensions.cs

Lines changed: 0 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -297,53 +297,6 @@ public static void SetHistoryTableSchema(this IMutableEntityType entityType, str
297297
return (string.IsNullOrEmpty(schema) ? "" : schema + ".") + historyTableName;
298298
}
299299

300-
/// <summary>
301-
/// Returns a value indicating whether the period columns of the entity type mapped to a temporal table are
302-
/// defined with the HIDDEN flag, which excludes them from <c>SELECT *</c> results.
303-
/// </summary>
304-
/// <remarks>
305-
/// The default value is <see langword="true" />, matching the behavior of EF Core releases prior to this option
306-
/// being introduced. Set to <see langword="false" /> to make the period columns visible.
307-
/// </remarks>
308-
/// <param name="entityType">The entity type.</param>
309-
/// <returns><see langword="true" /> if the period columns are hidden; otherwise <see langword="false" />.</returns>
310-
public static bool IsTemporalPeriodColumnsHidden(this IReadOnlyEntityType entityType)
311-
=> entityType[SqlServerAnnotationNames.TemporalPeriodColumnsHidden] as bool? ?? true;
312-
313-
/// <summary>
314-
/// Sets a value indicating whether the period columns of the entity type mapped to a temporal table are
315-
/// defined with the HIDDEN flag.
316-
/// </summary>
317-
/// <param name="entityType">The entity type.</param>
318-
/// <param name="hidden">The value to set; <see langword="null" /> to remove the explicit configuration.</param>
319-
public static void SetIsTemporalPeriodColumnsHidden(this IMutableEntityType entityType, bool? hidden)
320-
=> entityType.SetOrRemoveAnnotation(SqlServerAnnotationNames.TemporalPeriodColumnsHidden, hidden);
321-
322-
/// <summary>
323-
/// Sets a value indicating whether the period columns of the entity type mapped to a temporal table are
324-
/// defined with the HIDDEN flag.
325-
/// </summary>
326-
/// <param name="entityType">The entity type.</param>
327-
/// <param name="hidden">The value to set; <see langword="null" /> to remove the explicit configuration.</param>
328-
/// <param name="fromDataAnnotation">Indicates whether the configuration was specified using a data annotation.</param>
329-
/// <returns>The configured value.</returns>
330-
public static bool? SetIsTemporalPeriodColumnsHidden(
331-
this IConventionEntityType entityType,
332-
bool? hidden,
333-
bool fromDataAnnotation = false)
334-
=> (bool?)entityType.SetOrRemoveAnnotation(
335-
SqlServerAnnotationNames.TemporalPeriodColumnsHidden,
336-
hidden,
337-
fromDataAnnotation)?.Value;
338-
339-
/// <summary>
340-
/// Gets the configuration source for the period-columns-hidden setting.
341-
/// </summary>
342-
/// <param name="entityType">The entity type.</param>
343-
/// <returns>The configuration source for the period-columns-hidden setting.</returns>
344-
public static ConfigurationSource? GetIsTemporalPeriodColumnsHiddenConfigurationSource(this IConventionEntityType entityType)
345-
=> entityType.FindAnnotation(SqlServerAnnotationNames.TemporalPeriodColumnsHidden)?.GetConfigurationSource();
346-
347300
#endregion Temporal table
348301

349302
#region SQL OUTPUT clause

src/EFCore.SqlServer/Extensions/SqlServerPropertyExtensions.cs

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1050,4 +1050,52 @@ public static void SetIsSparse(this IMutableProperty property, bool? sparse)
10501050
/// <returns>The <see cref="ConfigurationSource" /> for whether the property's column is sparse.</returns>
10511051
public static ConfigurationSource? GetIsSparseConfigurationSource(this IConventionProperty property)
10521052
=> property.FindAnnotation(SqlServerAnnotationNames.Sparse)?.GetConfigurationSource();
1053+
1054+
/// <summary>
1055+
/// Returns a value indicating whether the property's column is defined with the SQL Server <c>HIDDEN</c> flag,
1056+
/// which excludes the column from <c>SELECT *</c> results.
1057+
/// </summary>
1058+
/// <remarks>
1059+
/// This applies to columns defined with <c>GENERATED ALWAYS AS</c>, including SQL Server temporal table
1060+
/// period columns. The default for temporal period columns is <see langword="true" />; for other columns
1061+
/// this annotation has no effect unless the column is generated.
1062+
/// </remarks>
1063+
/// <param name="property">The property.</param>
1064+
/// <returns><see langword="true" /> if the property's column is hidden.</returns>
1065+
public static bool? IsHidden(this IReadOnlyProperty property)
1066+
=> (property is RuntimeProperty)
1067+
? throw new InvalidOperationException(CoreStrings.RuntimeModelMissingData)
1068+
: (bool?)property[SqlServerAnnotationNames.IsHidden];
1069+
1070+
/// <summary>
1071+
/// Sets a value indicating whether the property's column is defined with the SQL Server <c>HIDDEN</c> flag.
1072+
/// </summary>
1073+
/// <param name="property">The property.</param>
1074+
/// <param name="hidden">The value to set; <see langword="null" /> to remove the explicit configuration.</param>
1075+
public static void SetIsHidden(this IMutableProperty property, bool? hidden)
1076+
=> property.SetOrRemoveAnnotation(SqlServerAnnotationNames.IsHidden, hidden);
1077+
1078+
/// <summary>
1079+
/// Sets a value indicating whether the property's column is defined with the SQL Server <c>HIDDEN</c> flag.
1080+
/// </summary>
1081+
/// <param name="property">The property.</param>
1082+
/// <param name="hidden">The value to set; <see langword="null" /> to remove the explicit configuration.</param>
1083+
/// <param name="fromDataAnnotation">Indicates whether the configuration was specified using a data annotation.</param>
1084+
/// <returns>The configured value.</returns>
1085+
public static bool? SetIsHidden(
1086+
this IConventionProperty property,
1087+
bool? hidden,
1088+
bool fromDataAnnotation = false)
1089+
=> (bool?)property.SetOrRemoveAnnotation(
1090+
SqlServerAnnotationNames.IsHidden,
1091+
hidden,
1092+
fromDataAnnotation)?.Value;
1093+
1094+
/// <summary>
1095+
/// Returns the <see cref="ConfigurationSource" /> for whether the property's column is hidden.
1096+
/// </summary>
1097+
/// <param name="property">The property.</param>
1098+
/// <returns>The <see cref="ConfigurationSource" /> for whether the property's column is hidden.</returns>
1099+
public static ConfigurationSource? GetIsHiddenConfigurationSource(this IConventionProperty property)
1100+
=> property.FindAnnotation(SqlServerAnnotationNames.IsHidden)?.GetConfigurationSource();
10531101
}

src/EFCore.SqlServer/Metadata/Builders/OwnedNavigationTemporalPeriodPropertyBuilder.cs

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,29 @@ public virtual OwnedNavigationTemporalPeriodPropertyBuilder HasPrecision(int pre
5656
return this;
5757
}
5858

59+
/// <summary>
60+
/// Configures whether the period column is defined with the SQL Server <c>HIDDEN</c> flag,
61+
/// which excludes it from <c>SELECT *</c> results.
62+
/// </summary>
63+
/// <remarks>
64+
/// <para>
65+
/// The default is <see langword="true" /> for period columns, matching the behavior of EF Core releases
66+
/// prior to this option being introduced. Set to <see langword="false" /> to make the column visible.
67+
/// </para>
68+
/// <para>
69+
/// See <see href="https://aka.ms/efcore-docs-temporal">Using SQL Server temporal tables with EF Core</see>
70+
/// for more information.
71+
/// </para>
72+
/// </remarks>
73+
/// <param name="hidden">A value indicating whether the column should be hidden.</param>
74+
/// <returns>The same builder instance so that multiple calls can be chained.</returns>
75+
public virtual OwnedNavigationTemporalPeriodPropertyBuilder IsHidden(bool hidden = true)
76+
{
77+
((IMutableProperty)_propertyBuilder.Metadata).SetIsHidden(hidden);
78+
79+
return this;
80+
}
81+
5982
#region Hidden System.Object members
6083

6184
/// <summary>

src/EFCore.SqlServer/Metadata/Builders/OwnedNavigationTemporalTableBuilder.cs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,18 @@ public virtual OwnedNavigationTemporalPeriodPropertyBuilder HasPeriodEnd(string
109109
/// <returns>The same builder instance so that multiple calls can be chained.</returns>
110110
public virtual OwnedNavigationTemporalTableBuilder PeriodColumnsHidden(bool hidden = true)
111111
{
112-
_referenceOwnershipBuilder.OwnedEntityType.SetIsTemporalPeriodColumnsHidden(hidden);
112+
var entityType = _referenceOwnershipBuilder.OwnedEntityType;
113+
if (entityType.GetPeriodStartPropertyName() is { } startName
114+
&& entityType.FindProperty(startName) is { } startProperty)
115+
{
116+
startProperty.SetIsHidden(hidden);
117+
}
118+
119+
if (entityType.GetPeriodEndPropertyName() is { } endName
120+
&& entityType.FindProperty(endName) is { } endProperty)
121+
{
122+
endProperty.SetIsHidden(hidden);
123+
}
113124

114125
return this;
115126
}

0 commit comments

Comments
 (0)