3 ms·
I've been using .NET almost exclusively on Linux since it was called .NET Core 2.0, and development platforms other than Windows do feel like second class citiz
by farlight 17d ago
I've been using .NET almost exclusively on Linux since it was called .NET Core 2.0, and development platforms other than Windows do feel like second class citizens. Any time you venture into anything remotely advanced, the tooling is usually Windows only.
"Everything" expects you to use MSSQL, even if today there's ok official support for PostgreSQL and SQLite. Most "thought leaders" of various sorts are on Windows and expect you to use it. This pervades throughout the ecosystem.
Can't see this ever changing as it's not in MS' interest to turn other operating systems into good .NET development platforms.
- aksss 17d agoI'm sure you know more about this than me, but EF works fine with SQLite for a project I work on. There are limitations, but I think there's a difference between the idea of EF deliberately not implementing some features for SQLite and SQLite itself not having support for some EF features (which is the reality I'm familiar with). SQL Server is the flagship database project on the Microsoft side and that team surely has some imperative to facilitate the EF vision. It simply must be less of a priority for the PostgreSQL and SQLite maintainers to do so. Is that really a valid dig on the .net ecosystem, though?
- moron4hire 16d agoIncidentally, I'm seriously considering dropping EF. The ability to apply migrations is nice. I find the means of authoring them to be arcane and capricious. Not having to write every simple query is nice, but it gets really hard to do complex or high performance stuff. After a decade of using this thing, I find myself fighting the Entity tracker more and more and now I'm seriously questioning if it's really all worth it.
- intrasight 16d agoI use EF now - but only for the string interpolation in Database.SqlQuery and Database.ExecuteSql. We don't use POCOs but instead use XML and JSON with Linq.
- moron4hire 16d agoIt's really the navigations that make EF a problem. I've built a typed object graph database on top of Sqlite that works really well specifically because it's in Sqlite, so the overhead of the 1+N query problem with recursively descending navigations isn't a big problem. But it requires lazy loading and that requires all the navigation to happen inside a single service scope and that makes sequencing some things get difficult (can't just pass the results around willy nilly). The navigation system in EF is where all of the pain points originate. All of my troubles with getting the migration generator to work are because I'm trying to express rather complex relationships. For example, to store a record representing a property on an object, I need to have two foreign keys from the Properties table to the Types table: one for the type of the property and one for the type in which the property lives. Types themselves have many relationships to other types: their base type, interface types they implement, generic type parameters, constraints on generic type parameters (actually, haven't even implemented that one as is too much). I'm generally happy with the performance and expressivity of the system I've developed so far, but damn, it came with a lot of pain.
- littlecranky67 16d agoTo be fair, in EFcore (other than EF) lazy-loading and auto-navigation is not on by default - you opted in at some point (with all its trade-offs). EFcore differs from traditional EF that they removed a lot of the magic or made it opt-in, and you can use EFcore as a very basic/thin query engine similar to Dapper.
- osigurdson 16d agoI think for most projects, add an ORM only after you start getting really annoyed and understand what you are trading.
- qingcharles 17d agoI can't even remember the last time I used MSSQL with .NET. I'm embarrassed that I worked on projects now that were paying huge sums for licenses when .NET works so absolutely well with every other DB. These days I just use EF with Sqlite on 99% of my projects.
- osigurdson 16d agoI used .NET for many years with Postgres on a huge project. Honestly, I don't know what you mean. Can you break down "Everything" a little. What is it that expects MSSQL? Who are the thought leaders pushing it? I'd say Microsoft's revenue related push with .NET these days is to try to subtly nudge you into Azure (where MSSQL is rare and Windows is virtually non-existent). But, I also think they know they will kill .NET if they go overboard with it as the competition is strong.
- replwoacause 16d agoI do all my dev in .NET on a mac, using Postgres and Sqlite only, so I don't relate to your experience at all. It's dead simple for me and I'm not even that good of a developer.