✅ Generic nullable type
I have an interface
I need to convert theses types using a ValueConverter for EF Core.
This works fine for value types. e.g.
With an entity :
When I make my value object nullable, the property becomes a reference type and I'm confused of how I can handle saving a null value to the database with the type converter.
Other ref: https://github.com/adampaquette/Typely/blob/main/src/Typely.Core/ITypelyValue.cs
ITypelyValue<TValue, TTypelyValue> that let me create validated value objects.I need to convert theses types using a ValueConverter for EF Core.
This works fine for value types. e.g.
public struct MyValueObject : ITypelyValue<int, MyValueObject>{...}.With an entity :
When I make my value object nullable, the property becomes a reference type and I'm confused of how I can handle saving a null value to the database with the type converter.
Other ref: https://github.com/adampaquette/Typely/blob/main/src/Typely.Core/ITypelyValue.cs
GitHub
Typely lets you create types easily with a fluent API to embrace Domain-driven design and value objects. - Typely/ITypelyValue.cs at main · adampaquette/Typely