예제 #1
0
        private static void ConfigureChangeFields(
            OwnedNavigationBuilder <ProductFieldChangedProductChangeNoteEntity, FieldChangedRecordEntity> builder)
        {
            builder.ToJsonProperty("changedFields");

            builder.Property(entity => entity.FieldName).ToJsonProperty("fieldName").IsRequired();
            builder.Property(entity => entity.PreviousValue).ToJsonProperty("previousValue").IsRequired();
            builder.Property(entity => entity.NewValue).ToJsonProperty("newValue").IsRequired();
        }
 public static void ToJsonProperties <T, D>(this OwnedNavigationBuilder <T, D> builder)
     where T : class
     where D : class
 {
     builder.ToJsonProperty(FirstCharToLowerCase(builder.Metadata.GetNavigation(false).Name));
     foreach (var property in GetProperties(builder))
     {
         builder.Property(property.Name).ToJsonProperty(FirstCharToLowerCase(property.Name));
     }
 }