News for hackers. Stuff that matters.
Re:Fable 3: F# to JavaScript compiler by JaggerJo on Friday December 04, 2020 @02:38PM (#25306694)
It’s a .Net library so it works (or should work) with F#.

What sometimes leads to problems is F#’s record and discriminated union types.

Not sure how they are handled by EF Core.

Going back to plain SQL is just great. You know exactly what SQL gets executed. No Magic.

With DustyTables it’s also not too much boilerplate.

Re:Fable 3: F# to JavaScript compiler by banashark on Friday December 04, 2020 @03:19PM (#25307261)
Design-time support is still via a non-released package. So you'll write models/etc in C# and use EF from F#. There are ways to get design-time constructs working in F#, but it's not plug-and-play like from the C# side.
Re:Fable 3: F# to JavaScript compiler by angio on Friday December 04, 2020 @03:23PM (#25307315)
You can write models in F# (with CLIMutables everywhere), but then you need to put models in a separate project, then add a C# project for migrations, and finally reference both projects from your ASP.NET app.
Re:Fable 3: F# to JavaScript compiler by ben509 on Friday December 04, 2020 @03:44PM (#25307656)
Apparently C# 7 can match discriminated unions quite well[1], with the caveats being:

1. you need a dummy type[2] for empty parts of the union.

2. it still can't enforce exhaustive matching.

[1]: https://stu.dev/pattern-matching-fsharp-union-types-in-cshar...

[2]: Maybe () would work?