Comment by torginus

1 day ago

While C# is great, but the problem with programming languages, is you're net only picking a language, but a kind of company who uses it, and a kind of person who writes it.

Which means if you write C#, you'll encounter a ton of devs who come from an enterprise, banking or govt background, who think doing a 4 layer enterprise architecture with DTOs and 5 line classes is the only way you can write a CRUD app, and the worst of all you'll se a ton of people who learned C# in college a decade ago and refuse to learn anything else.

EF is great, but most people use it because they don't have to learn SQL and databases.

Blazor is great, but most people use it because they don't want to learn Frontend dev, and JS frameworks.

I think you have a point with the types of resources, but in my experience, its also not hard to separate the wheat from the chaff with pretty simple heuristics (though that is likely very different now with AI and cheating!).

"Modern C#" (if we can differentiate that) has a lot of nice amenities for modeling like immutable `record` types and named tuples. I think where EF really shines is that it allows you to model the domain with persistence easily and then use DTOs purely as projections (which is how I use DTOs) into views (e.g. REST API endpoints).

I can't say for the broader ecosystem, but at least in my own use cases, EFC is primarily used for write scenarios and some basic read scenarios. But in almost all of my projects, I end up using CQRS with Dapper on the read side for more complex queries. So I don't think that it's people avoiding SQL; rather it's teams focused on productivity first.

WRT to Blazor, I would not recommend it in place of JS except for internal tooling (tried it at one startup and switched to Vue + Vite). But to be fair, modern FE development in JS is an absolute cluster of complexity.

C# is also the lingua Franca of mobile games because of Unity.

And when the front end is C# so is the back end.

  • Imo, Unity C# is almost 'not real' C#, as in it uses a completely different programming model, with different object lifetimes, programming and object models. I know the execution bits are the same, but programming for Unity feels very different in every way than writing ASP.NET code (and more different than moving from ASP.NET to Spring Boot)