-
Notifications
You must be signed in to change notification settings - Fork 3
Migration from v9 to v10
Pawel Gerr edited this page Nov 28, 2025
·
2 revisions
This guide covers breaking changes and new features when migrating from v9 to v10.
- Dropped support for .NET 7 - Minimum version is now .NET 8.0
- Dropped support for Entity Framework Core 7 - Minimum version is now EF Core 8.0
- Minimum .NET SDK increased to 8.0.416
All types and members previously marked with [Obsolete] have been deleted. This includes:
Entity Framework Core:
-
UseValueObjectValueConverter→ UseUseThinktectureValueConvertersinstead -
AddValueObjectConverters→ UseAddThinktectureValueConvertersinstead
Interfaces:
-
IEnum<TKey>→ UseISmartEnum<TKey>instead -
IEnum<TKey, T, TValidationError>→ UseISmartEnum<TKey, T, TValidationError>instead -
IValueObjectFactory<TValue>→ UseIObjectFactory<TValue>instead -
IValueObjectFactory<T, TValue, TValidationError>→ UseIObjectFactory<T, TValue, TValidationError>instead -
IComplexValueObjectinterface deleted (implementation was already generated automatically)
Enums:
-
ValueObjectAccessModifierenum → UseAccessModifierenum instead
ASP.NET Core:
-
TrimmingSmartEnumModelBinderclass deleted
Attributes:
- Several obsolete attribute constructor overloads removed
- Updated Swashbuckle.AspNetCore.SwaggerGen to 10.0.1 - If you use the Swashbuckle integration package, ensure compatibility with Swashbuckle 10.x
v10 introduces a new, more structured configuration API for Entity Framework Core integration. The old callback-based approach is deprecated but still supported for backward compatibility.
The UseThinktectureValueConverters method now accepts a Configuration object that provides:
- Type-safe configuration for Smart Enums and Keyed Value Objects
- Built-in max length strategies for automatic database column sizing
- Better defaults with smart enum max length calculation out-of-the-box
.UseThinktectureValueConverters(configureEnumsAndKeyedValueObjects: property =>
{
if (property.ClrType == typeof(ProductType))
{
var maxLength = ProductType.Items.Max(i => i.Key.Length);
property.SetMaxLength(maxLength + (10 - maxLength % 10)); // round up to next 10
}
else if (property.ClrType == typeof(ProductName))
{
property.SetMaxLength(200);
}
})Option 1: Use default configuration (automatic max length for string-based smart enums)
.UseThinktectureValueConverters()
// or explicitly:
.UseThinktectureValueConverters(Configuration.Default)Option 2: Custom configuration with strategies
.UseThinktectureValueConverters(new Configuration
{
SmartEnums = new SmartEnumConfiguration
{
// Automatically calculates max length from items and rounds to next 10
MaxLengthStrategy = DefaultSmartEnumMaxLengthStrategy.Instance
},
KeyedValueObjects = new KeyedValueObjectConfiguration
{
MaxLengthStrategy = new CustomKeyedValueObjectMaxLengthStrategy((type, keyType) =>
{
if (type == typeof(ProductName))
return 200;
return MaxLengthChange.None; // Max length stays unchanged
})
}
})