Thalnos
β
Need Advice: Choosing the Right .NET Version for Our Project
so If I understand you right then razor pages is fine for some small app when you wanna stick to mostly c# and not wanna learn JS/TS, and blazor is just never a good choice cuz its dying out?
83 replies
β
Need Advice: Choosing the Right .NET Version for Our Project
will watch it thanks. My personally prefered tech stack is a Asp.Net Core WebApi backend with a React frontend so I think we share that preference, but I was surprised to hear that razor pages/blazor should be avoided.
Razor pages is fairly new as a replacement of MVC, and Blazor is fairly new too and was praised as that new fancy thing with Webassembly and stuff so I thought both these approaches are up to date and quite popular. Maui integrates Blazor too for hybrid apps that run in browser and natively so it can't be very evil, so I thought @TeBeCo
83 replies
β
How to get better at writing EF Queries?
there is three kinds of querying, Eager loading which you have done here, Lazy Loading and Explicite Loading. Check out pros and cons of each that might help you when to use which.
I've never used explicite loading and dont really know when to use that honestly but for Eager and Lazy loading, the con of Eager loading is loading the whole data into memory, the con of Lazy Loading is that it can result in too many queries - the N + 1 Queries problem.
Generally you should favor Eager loading to not run into slow loading time issues with Lazy Loading but if the loading all data into memory all at once becomes an issue then lazy loading could be beneficial.
But do not fall into the trap of preemptive optimization, only try to optimize when you really have a performance issue that needs optimization, otherwise you're just wasting time for nothing π
70 replies