4 ms·
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
by JaggerJo 6y ago
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.
- banashark 6y agoDesign-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.
- angio 6y agoYou 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.
- ben509 6y agoApparently 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-csharp/ https://stu.dev/pattern-matching-fsharp-union-types-in-cshar... [2]: Maybe () would work?