Exemplo n.º 1
0
 /// <summary>
 /// Enables the automatic recording change history.
 /// </summary>
 /// <param name="modelBuilder">The <see cref="ModelBuilder"/> to enable auto history feature.</param>
 /// <param name="changedMaxLength">The maximum length of the 'Changed' column. <c>null</c> will use default setting 2048.</param>
 /// <returns>The <see cref="ModelBuilder"/> had enabled auto history feature.</returns>
 public static ModelBuilder EnableAutoHistory(this ModelBuilder modelBuilder, int?changedMaxLength)
 {
     return(ModelBuilderExtensions.EnableAutoHistory <DataHistory>(modelBuilder, o =>
     {
         o.ChangedMaxLength = changedMaxLength;
         o.LimitChangedLength = false;
     }));
 }
Exemplo n.º 2
0
 /// <summary>
 /// Enables the automatic recording change history.
 /// </summary>
 /// <param name="modelBuilder">The <see cref="ModelBuilder"/> to enable auto history feature.</param>
 /// <param name="changedMaxLength">The maximum length of the 'Changed' column. <c>null</c> will use default setting 2048.</param>
 /// <param name="JsonSerializerOptions">The json setting for the 'Changed' column</param>
 /// <returns>The <see cref="ModelBuilder"/> had enabled auto history feature.</returns>
 public static ModelBuilder EnableAutoHistory(this ModelBuilder modelBuilder, int?changedMaxLength = null, JsonSerializerOptions JsonSerializerOptions = null)
 {
     return(ModelBuilderExtensions.EnableAutoHistory <AutoHistory>(modelBuilder, o =>
     {
         o.ChangedMaxLength = changedMaxLength;
         o.LimitChangedLength = false;
         o.JsonSerializerOptions = JsonSerializerOptions;
     }));
 }