TheCodeMan__'s profile picture. ➡️ Level Up with Everyday .NET Content | Microsoft MVP
➡️ YouTube: https://www.youtube.com/@thecodeman_
➡️ http://TheCodeMan.net Newsletter

Stefan Đokić | .NET

@TheCodeMan__

➡️ Level Up with Everyday .NET Content | Microsoft MVP ➡️ YouTube: https://www.youtube.com/@thecodeman_ ➡️ http://TheCodeMan.net Newsletter

Pinned

Many of you guys don't know I started a YouTube channel 😶 You can subscribe here: youtube.com/@thecodeman_ I started this year with one big goal: to start sharing knowledge on YouTube. This is my first video content. And I can tell you that it is not easy at all. But I…

TheCodeMan__'s tweet image. Many of you guys don't know I started a YouTube channel 😶 

You can subscribe here: youtube.com/@thecodeman_

I started this year with one big goal: to start sharing knowledge on YouTube. 

This is my first video content. 

And I can tell you that it is not easy at all. 
But I…

Here is my favourite .editorconfig rule: -> Naming conventions for async methods and fields Define clear naming rules for private fields, async methods, interfaces, etc. Why: Prevents confusion when working with async APIs and makes intentions clear. For those who don't know:…

TheCodeMan__'s tweet image. Here is my favourite .editorconfig rule:

-> Naming conventions for async methods and fields

Define clear naming rules for private fields, async methods, interfaces, etc.

Why: Prevents confusion when working with async APIs and makes intentions clear.

For those who don't know:…

Most apps cache with a simple key-value. But what if you need to fetch the same object using two identifiers (UserId & Email, ProductId & SKU)? Single-key caching breaks fast. Dual-key caching solves it with: - O(1) reverse lookups - Cleaner updates - Consistent invalidation -…


🚀 The pre-order for my Pragmatic .NET Code Rules course is going strong - but several people asked: “Do you have something we can dive into right now while waiting for the course?” Yes. Actually… two things. I have two .NET design patterns eBooks that thousands of…

TheCodeMan__'s tweet image. 🚀 The pre-order for my Pragmatic .NET Code Rules course is going strong - but several people asked:

“Do you have something we can dive into right now while waiting for the course?”

Yes. Actually… two things. 

I have two .NET design patterns eBooks that thousands of…

If you’re working on more than one #Dotnet project, Chances are you keep repeating the same things: • C# language version • NuGet ,versions • Warning settings • Code style rules • Build configuration … over and over again in every csproj. That’s not productivity -…

TheCodeMan__'s tweet image. If you’re working on more than one #Dotnet project, 

Chances are you keep repeating the same things:

• C# language version
• NuGet ,versions
• Warning settings
• Code style rules
• Build configuration

… over and over again in every csproj.
That’s not productivity -…

Don't do this in your EF Queries (Newbies read this) How to solve the N+1 problem ⬇️ Performance Considerations: 𝐐𝐮𝐞𝐫𝐲 𝐈𝐧𝐬𝐢𝐝𝐞 𝐋𝐨𝐨𝐩: Executing the query repeatedly inside the loop results in multiple database roundtrips, which can cause significant…

TheCodeMan__'s tweet image. Don't do this in your EF Queries
(Newbies read this)  

How to solve the N+1 problem ⬇️ 

Performance Considerations:  

𝐐𝐮𝐞𝐫𝐲 𝐈𝐧𝐬𝐢𝐝𝐞 𝐋𝐨𝐨𝐩:   

Executing the query repeatedly inside the loop results in multiple database roundtrips, which can cause significant…

Clean, consistent code doesn’t happen by accident. It happens by design. Over the last few years, I've worked on dozens of .NET projects - from small internal tools to massive enterprise systems, and that one thing has always been the same. Today, I’m excited to finally…

TheCodeMan__'s tweet image. Clean, consistent code doesn’t happen by accident.

It happens by design.

Over the last few years, I've worked on dozens of .NET projects - from small internal tools to massive enterprise systems, and that one thing has always been the same.
 
Today, I’m excited to finally…

What are request timeouts in ASP .NET Core? Why do timeouts matter? Think of timeouts like timers you set when you're waiting for something - for example, waiting for a web request to finish, or for a connection to respond. If the timer runs out, the system stops waiting…

TheCodeMan__'s tweet image. What are request timeouts in ASP .NET Core?  
Why do timeouts matter?  

Think of timeouts like timers you set when you're waiting for something - for example, waiting for a web request to finish, or for a connection to respond. 

If the timer runs out, the system stops waiting…

Stop redeploying for every new filter. Start letting your filters ship themselves. ⬇️ What if your LINQ Where could take a runtime rule - and still run as a real SQL-translated query? Hard-coding filters feels fine… until Product asks for “one more field.” Suddenly,…

TheCodeMan__'s tweet image. Stop redeploying for every new filter. 

Start letting your filters ship themselves. ⬇️ 

What if your LINQ Where could take a runtime rule - and still run as a real SQL-translated query?

Hard-coding filters feels fine… until Product asks for “one more field.” 

Suddenly,…

You can use a blocking approach by calling .Wait() and .Result, But don't do it. This approach is discouraged because it wraps exceptions in AggregateException. Problems with Wait() and Result: • Exceptions are wrapped in AggregateException, making error handling more…

TheCodeMan__'s tweet image. You can use a blocking approach by calling .Wait() and .Result, 

But don't do it.

This approach is discouraged because it wraps exceptions in AggregateException.

Problems with Wait() and Result:

• Exceptions are wrapped in AggregateException, making error handling more…

Your CI pipeline should be your first code reviewer - not your teammate. Most teams still treat GitHub Actions as “just a build runner.” ⬇️ Big mistake. Here’s the thing: With just three files, you can make your .NET project enforce quality automatically: 1. Directory.…

TheCodeMan__'s tweet image. Your CI pipeline should be your first code reviewer - not your teammate.

Most teams still treat GitHub Actions as “just a build runner.” ⬇️ 

Big mistake.
Here’s the thing:

With just three files, you can make your .NET project enforce quality automatically:

1. Directory.…

Are your filters and queries constantly changing? Do you find yourself redeploying your app every time the business logic changes? In this video, I’ll show you how to make your LINQ queries dynamic using C# Eval Expression - the ultimate way to build flexible,…

TheCodeMan__'s tweet image. Are your filters and queries constantly changing? 

Do you find yourself redeploying your app every time the business logic changes?  

In this video, I’ll show you how to make your LINQ queries dynamic using C# Eval Expression - the ultimate way to build flexible,…

If you had to remove one thing from #donet forever - what would it be? Mine: implicit usings. (yeah, I said it)


Stefan Đokić | .NET reposted

How to register multiple implementations of the same interface? Did you hear about Keyed Services? Let’s say you have two classes that do the same thing in different ways. For example: 1. One saves files to the local disk 2. Another uploads them to cloud storage Both…

TheCodeMan__'s tweet image. How to register multiple implementations of the same interface?

Did you hear about Keyed Services?

Let’s say you have two classes that do the same thing in different ways.

For example:

1. One saves files to the local disk
2. Another uploads them to cloud storage

Both…

Loading...

Something went wrong.


Something went wrong.