News for hackers. Stuff that matters.
Re:The Problem with F# Evangelism by Boothroid on Wednesday August 16, 2017 @12:26PM (#15028785)
I'm interested to know why you describe EF as a monstrosity? Genuine interest, I just started using EF for the first time a few weeks ago for a work project so I've only scratched the surface but it didn't seem terrible, although I did find that only being able to update all tables after a change to the database as opposed to a single table to be a bit of a limitation.
Re:The Problem with F# Evangelism by maxxxxx on Wednesday August 16, 2017 @02:45PM (#15030033)
In all the EF projects I have been on it caused weird issues after a while. Code first projects don't upgrade anymore or the order of saving is wrong or performance is bad.

In pretty much all of them we ended up writing a simple wrapper around the database that was much easier to control.

Re:The Problem with F# Evangelism by Boothroid on Wednesday August 16, 2017 @05:27PM (#15031524)
Useful info.
Re:The Problem with F# Evangelism by cm2187 on Wednesday August 16, 2017 @12:44PM (#15028947)
If you use code first it's very easy to get in a corrupted state where it doesn't know how to update the database. Otherwise it speeds up the basic tasks then it gets in your way to write more sophisticated queries.

I found that a good solution is to write a generic sql serialiser that does all the basic operations (insert, update, select, delete, read one or multiple from readers) and do the rest by hand. It avoids most of the tedious code/sql while not getting in your way to do things like transactions, bulk inserts, etc

Re:The Problem with F# Evangelism by Boothroid on Wednesday August 16, 2017 @01:18PM (#15029270)
Interesting, thank you.
Re:The Problem with F# Evangelism by rubber_duck on Thursday August 17, 2017 @07:28AM (#15035714)
I feel the same way about all ORMs I've seen (minus micro ORMs which I feel are just inferior to F# type providers but work in same spirit) they just try to map two semantically incompatible data models and try to make it look transparent with a bunch of needles complexity - when it ends up failing you're stuck with something that's a hell to debug and tweak.

Contrast that with type providers - they expose SQL to the compiler - this way you get compile time SQL query checking, type checking (it generates types for SQL queries) and it's manipulating data as input and output with known standard SQL semantics.

Re:The Problem with F# Evangelism by jackmott on Wednesday August 16, 2017 @05:32PM (#15031558)
EF is great when things are small and simple. It is when things get big and complex that it can be a hindrance both to understanding what is happening (when does my code actually hit the database?) and how it happens (what query is being generated here?)

Usually the result is performance problems.