efcore / EFCore.FSharp

Adds F# design-time support to EF Core
MIT License
228 stars 26 forks source link

singleCaseUnionMemberTranslator Translate should return null for non-applicable expressions #146

Open MaceWindu opened 1 year ago

MaceWindu commented 1 year ago

IMemberTranslator.Translate should return null for unhandled expressions, but implementation in singleCaseUnionMemberTranslator returns received expression: https://github.com/efcore/EFCore.FSharp/blob/a43b78c7833f9e9e346c5ff79c855e68620047bf/src/EFCore.FSharp/Translations/SingleCaseUnionTranslation.fs#L12

I don't have isolated test, but it creates issue for us here https://github.com/linq2db/linq2db/issues/3743 - we receive expression after translation in place where we should receive null