Modernizing Legacy ASP.NET (http://ASP.NET)? Don't Fall Into the Task.Run Trap. When you're build...Modernizing Legacy ASP.NET (http://ASP.NET)? Don't Fall Into the Task.Run Trap. When you're build...
The network for creativity
Join 1.25M professional creatives like you
Connect with clients, get discovered, and run your business 100% commission-free
Creatives on Contra have earned over $150M and we are just getting started
Modernizing Legacy ASP.NET? Don't Fall Into the Task.Run Trap.
When you're building new async controllers and services but your repositories are still synchronous.
Don't wrap sync calls in Task.Run!
You'll burn two thread pool threads instead of one.
1. Use Task.FromResult to bridge the gap honestly.
2. Use the Adapter Pattern to keep a clean boundary.
3. Migrate repositories to truly async — one at a time.
Your new code should be async from day one. Your legacy code can catch up incrementally.
The key? Design async interfaces now, even if the first implementation behind them is synchronous. When the real async repo is ready, it's a one-line DI swap.
Startfrom 2.0 is live. It's our template library: finished websites designed at Apollo Studio, available as a Framer project, an Astro theme or a Next.js app.
Each template page shows what you get and runs the live demo in the page. Some templates are free.
Keeping content separate from layout would make the Astro and Next.js versions easier to customise. Do they share a content schema, or does each template have its own setup?
KathStore is an exciting E-Commerce website which reflects my technical skills. The Tech Stack I used in this project is ReactJs and Three.js (Frontend), ASP.NET Core (Backend), MySQL (Database), JWT for Authentication and Security.
I'd calculate the order total on the server from product IDs and quantities, since prices in an open cart can go out of date. Does checkout recheck both price and stock before creating the order?