Replies: 10 comments 1 reply
-
This is an incredibly valuable overview. It's been a long time since I looked at this area, it would be great to have community assistance here |
Beta Was this translation helpful? Give feedback.
-
I would like to add 5 cents here. More often than not, ORM experience is a blocker for F# introduction in a lot of companies |
Beta Was this translation helpful? Give feedback.
-
@Szer Is it really the case that the specific bugs above (all related to LINQ queries) are blockers? Or are you referring to the general ORM area - including the whole end to end experience (including docs, perf etc.) of other ORM techniques, including techniques that are non-LINQ? I've not specifically heard that either are an absolute blocker before - though I can see each one is technically challenging in certain specific circumstances, and I'd love to see improvements here. In commercial usage there are often many potential blockers as people look for reasons to proceeed/reject a technology. I just want to gather evidence here and make sure we're working on the right things, and that depends whether you're saying something general about ORM or specific about these issues. And if the issues are the actual blockers, which is most important? A priority list would be helpful thanks |
Beta Was this translation helpful? Give feedback.
-
As an aside, on the whole it's really hard to judge just how much F# queries actually get used in practice. Many of the community write zero queries. Some commercial projects write hundreds (and perf is not critical, because it's experimental code). Some people use them in production performance-critical code. Lots to ponder |
Beta Was this translation helpful? Give feedback.
-
my guess is @Szer's comment is about using ORMs in general. It's an ugly reality of bogstandard software interacting with a sql database and there aren't really any good options when using F#. None ever feel particularly friendly towards expression-based functional programming, and especially EF (the one pushed by microsoft) is extremely complicated and full of little "magic" things that are C#-centric and even worse with F#. I would posit that programming against EF from F# is most definitely a "hard mode" kind of programming, and its ubiquity in the software world means nobody using F# on the server is going to have a good time in that kind of environment. |
Beta Was this translation helpful? Give feedback.
-
@cartermp totally agree. My thought was about EF, which is the most prominent ORM in the market and MS is behind it. F# experience with EF is so bad, that in our community we just recommend don't bother with EF at all and use Dapper or Linq2DB. And that advice is a blocker because people got used to EF so much |
Beta Was this translation helpful? Give feedback.
-
Hi all, Shay here from the EF team. Just wanted to say that better F# support is a recurring occasional conversation, and that we'd definitely interested in improving the F# experience for EF Core (subject to priorities of course). While it's true that we're C#-centric as a general rule (because that's what the vast majority of our users use), I think the team is quite open to improvements for supporting other languages (several such improvements for VB.NET have gone into the recent EF Core 5.0 release). One problem here is that nobody in the team is a real F# native (though @bricelam has already done some work), and so we definitely require help from the F# community to know exactly what is needed. Another thing to note, is that we haven't seen that much interest (in the form of issues being filed for better F# support), though that may well be a vicious cycle where people aren't even trying EF with F#. More concretely:
One additional important note... For people familiar with the older EF6, I'd recommend not assuming that EF Core works in the same way. There are certainly similarities between the two, but EF Core was rewritten from the ground up and is far more extensible in many ways. Bottom line, please don't hesitate to engage with us by opening concrete issues on our repo! |
Beta Was this translation helpful? Give feedback.
-
I also want to add my five cents. As @Szer mentioned, I'm from another company that was blocked during the F# investigation as a potentially new language because of ORM. For us it is critical because we use RDBMS a lot. Yes, that is possible to use Dapper or another micro-ORMs but that is completely dissimilar experience than using EF or NHibernate. |
Beta Was this translation helpful? Give feedback.
-
@roji I can confirm the vicious cycle - almost every new person joining russian speaking fsharp community starts with ef (from previous csharp experience) as Microsoft default orm and after having bad times with it doesn't ever return to it or use at work even after gaining sufficient fsharp knowledge. Current situation is fsharp=microOrm, which is not that bad, but is a blocker for orm apologets. This issue is a great start to change the situation |
Beta Was this translation helpful? Give feedback.
-
@roji @dsyme updates on this and on F# interop? maybe also some docs on how to use F# with entity framework today could help, |
Beta Was this translation helpful? Give feedback.
-
I'm trying to move the project I'm working on from C# towards F#.
It's mostly back-end and involves a lot of database querying which is being done via EntityFramework and Linq2DB, which seems a pretty common case for C# projects.
This issue is to keep track of issues related to F# usability in scenarios involving expression-based ORMs.
If this issue format seems inappropriate for the repo, feel free to close it.
Quotation -> Expression
translationto_be_filed
Translate TuplePat ident referencing to .PropertyGet ItemX expressionsPerformance
QueryBuilder
Beta Was this translation helpful? Give feedback.
All reactions