You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
May be related to #25343 and possibly covered by #30677.
The work on primitive collections now enables:
publicclassArticle{publicIList<string>Keywords{get;}}// Maps to JSON string array in text column and facilitates queryingbuilder.Property(e =>e.Keywords);
Which is super helpful!
However, it does not appear to be possible to configure a value converter to provide a conversion to a primitive type to be stored as a primitive collection - for example:
publicclassArticle{publicIList<Tag>Tags{get;}}// Does not work: System.InvalidCastException : Unable to cast object of type 'System.Linq.Expressions.Expression1`1[System.Func`2[System.Object,System.String]]' to type 'System.Linq.Expressions.Expression`1[System.Func`2[System.Collections.Generic.IEnumerable`1[System.String],System.String]]'.builder.Property(e =>e.Tags).HasConversion(newTagListToStringEnumerableConverter());
While we can already use something like a TagListToJsonStringConverter today, that does not enable the primitive collections query enhancements.
Might something like this might be supported?
The text was updated successfully, but these errors were encountered:
@frankbuckley this should be possible by configuring a value converter on the element of the primitive collection, rather than on the collection itself. We're currently lacking APIs to configure anything on the element (e.g. store type, requiredness), but this is definitely something that's planned for 8.0. The tracking issue for that is #30730 (I've added a note there to test this).
May be related to #25343 and possibly covered by #30677.
The work on primitive collections now enables:
Which is super helpful!
However, it does not appear to be possible to configure a value converter to provide a conversion to a primitive type to be stored as a primitive collection - for example:
While we can already use something like a
TagListToJsonStringConverter
today, that does not enable the primitive collections query enhancements.Might something like this might be supported?
The text was updated successfully, but these errors were encountered: