-
Notifications
You must be signed in to change notification settings - Fork 28
Open
Description
Hello,
Thanks for this awesome package!
Is your feature request related to a problem? Please describe.
I would like to use an empty discriminated union to hold in my records
type BlogType
| Essay
| LongDescribe the solution you'd like
Something like registerEmptyUnionCases(), so I can just use mye EquineBeast DU as normal in by fsharp code.
If a define an Enum, it will be stored as 0, 1, 2 in the database.
Describe alternatives you've considered
If I could define a value converter on the ModelSnapshot that would also solve my problem (although registering in _.OnConfigure once would be much preferred). I have tried something like this with no luck (does not compile)
b.Property<BlogType>("BlogType")
.HasMaxLength(16)
.HasColumnType("char(16)")
.HasConversion (fun v -> v.ToString(), fun v -> BlogType.fromString v)
|> ignoreReactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels