Hello everyone! My name is Zoran Horvat. I am a consultant, developer, and software architect, author at Pluralsight, Udemy, and YouTube. In this channel, you will find advice on development and architecture in .NET and C#.
All opinions expressed in this channel are my own. They do not represent my employer (which I do not have anyway), nor that of any technology providers.


Zoran on C#

This week, we talk about ๐——๐—ฎ๐—ฝ๐—ฝ๐—ฒ๐—ฟ!

The latest YouTube video outlines the missing parts you will need to implement manually in any project built on Dapper. The video is available here: https://youtu.be/8kGDAsTOR9s

Programmers often choose Dapper over EF Core for the freedom it offers (in forming SQL statements), as well as the possibility to tweak and improve the critical data paths when the need arises.

However, I must point out that ๐˜„๐—ฒ ๐˜€๐—ต๐—ผ๐˜‚๐—น๐—ฑ ๐—ป๐—ผ๐˜ ๐—ฒ๐˜…๐—ฒ๐—ฟ๐—ฐ๐—ถ๐˜€๐—ฒ ๐˜๐—ต๐—ฎ๐˜ ๐—ฎ๐—ฏ๐—ถ๐—น๐—ถ๐˜๐˜† ๐—ผ๐—ป ๐—ฒ๐—ฎ๐—ฐ๐—ต ๐—ฎ๐—ป๐—ฑ ๐—ฒ๐˜ƒ๐—ฒ๐—ฟ๐˜† ๐—พ๐˜‚๐—ฒ๐—ฟ๐˜†. The majority of the database code we write executes infrequently, emphasizing flexibility and configurability over raw performance.

That is where the amazing story of programming with Dapper begins. We will start implementing persistence patterns similar to those already built into EF Core. Will you overdo it, then? ๐—ช๐—ถ๐—น๐—น ๐˜†๐—ผ๐˜‚ ๐—ณ๐—ฎ๐—น๐—น ๐—ถ๐—ป๐˜๐—ผ ๐˜๐—ต๐—ฒ ๐˜๐—ฟ๐—ฎ๐—ฝ ๐—ผ๐—ณ ๐—ด๐—ฒ๐—ป๐—ฒ๐—ฟ๐—ฎ๐—น๐—ถ๐˜‡๐—ถ๐—ป๐—ด ๐—ฎ ๐—บ๐—ถ๐—ฐ๐—ฟ๐—ผ-๐—ข๐—ฅ๐— ? That is a serious issue, which I will leave for you to ponder.

A few more videos about the relationship between Dapper and EF Core are planned on my YouTube channel in the following weeks. Make sure to subscribe to receive notifications when the videos come live: www.youtube.com/channel/UCxsW...


๐—•๐—ฒ๐—ณ๐—ผ๐—ฟ๐—ฒ ๐˜„๐—ฒ ๐—บ๐—ผ๐˜ƒ๐—ฒ to additional learning materials, let me announce the date for the full-day online training on March 30th, 2026: ๐—š๐—ฟ๐—ฎ๐—ฑ๐˜‚๐—ฎ๐—น๐—น๐˜† ๐—œ๐—บ๐—ฝ๐—ฟ๐—ผ๐˜ƒ๐—ถ๐—ป๐—ด ๐—ฆ๐—ผ๐—ณ๐˜๐˜„๐—ฎ๐—ฟ๐—ฒ ๐——๐—ฒ๐˜€๐—ถ๐—ด๐—ป. I have been holding this training for more than ten years now, with excellent feedback from attendees.

You can find the description and agenda at this link: itkonekt.com/2023/01/19/softdesign/

The audience size is limited. The basic price is 270 EUR. Group rates apply. Please get in touch with the organizer for details.


And here are some wonderful learning materials to help you improve your understanding of persistence strategies.

1. The ๐——๐—ฒ๐˜€๐—ถ๐—ด๐—ป๐—ถ๐—ป๐—ด ๐——๐—ฎ๐˜๐—ฎ-๐—œ๐—ป๐˜๐—ฒ๐—ป๐˜€๐—ถ๐˜ƒ๐—ฒ ๐—”๐—ฝ๐—ฝ๐—น๐—ถ๐—ฐ๐—ฎ๐˜๐—ถ๐—ผ๐—ป๐˜€ by Martin Kleppmann will teach you the theory of data storage in a way that is much wider than relational databases alone codinghelmet.com/go/book-designing-data-intensive-โ€ฆ
2. And, if you prefer proper university books, this textbook from Yale is the gold standard in database design: ๐——๐—ฎ๐˜๐—ฎ๐—ฏ๐—ฎ๐˜€๐—ฒ ๐—ฆ๐˜†๐˜€๐˜๐—ฒ๐—บ ๐—–๐—ผ๐—ป๐—ฐ๐—ฒ๐—ฝ๐˜๐˜€ by Abraham Silberschatz et al. codinghelmet.com/go/database-system-concepts#ad
3. Video course ๐——๐—ฎ๐˜๐—ฎ๐—ฏ๐—ฎ๐˜€๐—ฒ ๐——๐—ฒ๐˜€๐—ถ๐—ด๐—ป ๐—ฎ๐—ป๐—ฑ ๐—•๐—ฎ๐˜€๐—ถ๐—ฐ ๐—ฆ๐—ค๐—Ÿ ๐—ถ๐—ป ๐—ฃ๐—ผ๐˜€๐˜๐—ด๐—ฟ๐—ฒ๐—ฆ๐—ค๐—Ÿ from the University of Michigan, published at Coursera, will also teach you the fundamentals of working with relational databases and SQL codinghelmet.com/go/database-design-postgresql
4. Another great course on database design at Coursera is ๐—ฅ๐—ฒ๐—น๐—ฎ๐˜๐—ถ๐—ผ๐—ป๐—ฎ๐—น ๐——๐—ฎ๐˜๐—ฎ๐—ฏ๐—ฎ๐˜€๐—ฒ ๐——๐—ฒ๐˜€๐—ถ๐—ด๐—ป, from the University of Colorado Boulder codinghelmet.com/go/relational-database-design

๐——๐—ถ๐˜€๐—ฐ๐—น๐—ผ๐˜€๐˜‚๐—ฟ๐—ฒ: This post contains affiliate links. If you make a purchase through those links, I will earn a small amount.

4 days ago | [YT] | 67

Zoran on C#

The topic for this week is: ๐—ณ๐—ถ๐˜…๐—ถ๐—ป๐—ด ๐—ฎ๐—น๐—ถ๐—ฎ๐˜€๐—ถ๐—ป๐—ด ๐—ฏ๐˜‚๐—ด๐˜€!

You can watch the full video depicting the appearance and the resolution of one such bug. The video is available on YouTube: https://youtu.be/VdZh-cB1iwo

The term "alias" is pretty old, dating back to the early days of object-oriented programming. An alias is any reference pointing to the same object that your code is already pointing to. Most notably, if your object possesses another object, any external reference to that inner object is an alias.

Then comes the plot, where the external portion of code modifies the state of the inner object. If the object's validity depends on the containing object, too, then... what do you call that? A bug. An aliasing bug!

Aliasing bugs are the remnant of mutable design. Removing the possibility of an aliasing bug in a mutable design requires a hefty portion of defensive code in each controlling class.

On the other hand, immutable design is safe - by design. Aliasing bugs do not exist in immutable types because there are no shared mutable references. Problem solved.

As usual, here are some additional learning resources.

๐—™๐˜‚๐—ป๐—ฐ๐˜๐—ถ๐—ผ๐—ป๐—ฎ๐—น ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ด ๐—ถ๐—ป ๐—–# by Enrico Buonanno will teach you how to design immutable models in modern C# codinghelmet.com/go/buonanno-functional-programminโ€ฆ
๐——๐—ผ๐—บ๐—ฎ๐—ถ๐—ป ๐— ๐—ผ๐—ฑ๐—ฒ๐—น๐—ถ๐—ป๐—ด ๐— ๐—ฎ๐—ฑ๐—ฒ ๐—™๐˜‚๐—ป๐—ฐ๐˜๐—ถ๐—ผ๐—ป๐—ฎ๐—น by Scott Wlaschin is a classic book that focuses on changing your mindset to adopt functional design codinghelmet.com/go/wlaschin-functional-modeling-mโ€ฆ
๐—œ๐—ป๐˜๐—ฟ๐—ผ๐—ฑ๐˜‚๐—ฐ๐˜๐—ถ๐—ผ๐—ป ๐˜๐—ผ ๐—”๐—น๐—ด๐—ผ๐—ฟ๐—ถ๐˜๐—ต๐—บ๐˜€ by Thomas Cormen is another classic that will teach you the virtues of algorithms, which are the critical enabler to writing efficient immutable code codinghelmet.com/go/introduction-to-algorithms-booโ€ฆ

And, if you prefer hands-on trainings and learning by doing, then video courses may be the best choice for you:
๐—•๐—ฒ๐—ด๐—ถ๐—ป๐—ป๐—ถ๐—ป๐—ด ๐—ข๐—ฏ๐—ท๐—ฒ๐—ฐ๐˜-๐—ข๐—ฟ๐—ถ๐—ฒ๐—ป๐˜๐—ฒ๐—ฑ ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ด ๐˜„๐—ถ๐˜๐—ต ๐—–# at Udemy codinghelmet.com/go/beginning-oop-with-csharp
.๐—ก๐—˜๐—ง ๐—–๐—ผ๐—ฟ๐—ฒ ๐— ๐—ฎ๐˜€๐˜๐—ฒ๐—ฟ๐˜† at Coursera codinghelmet.com/go/dotnet-core-mastery
๐—”๐—ฑ๐˜ƒ๐—ฎ๐—ป๐—ฐ๐—ฒ๐—ฑ ๐—–# ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ด ๐—ถ๐—ป .๐—ก๐—˜๐—ง ๐—–๐—ผ๐—ฟ๐—ฒ at Coursera codinghelmet.com/go/advanced-csharp-programming
๐—•๐—ฎ๐—ฐ๐—ธ-๐—˜๐—ป๐—ฑ ๐——๐—ฒ๐˜ƒ๐—ฒ๐—น๐—ผ๐—ฝ๐—บ๐—ฒ๐—ป๐˜ ๐˜„๐—ถ๐˜๐—ต .๐—ก๐—˜๐—ง at Coursera codinghelmet.com/go/backend-development-with-dotneโ€ฆ

๐——๐—ถ๐˜€๐—ฐ๐—น๐—ผ๐˜€๐˜‚๐—ฟ๐—ฒ: This post contains affiliate links. If you make a purchase through those links, I will earn a small amount.

1 week ago | [YT] | 42

Zoran on C#

The topic for this week is: ๐˜ƒ๐—ฎ๐—น๐—ถ๐—ฑ๐—ฎ๐˜๐—ถ๐—ป๐—ด ๐—ฐ๐—ผ๐—บ๐—ฝ๐—น๐—ฒ๐˜… ๐—ฟ๐—ฒ๐—ฐ๐—ผ๐—ฟ๐—ฑ ๐˜๐˜†๐—ฝ๐—ฒ๐˜€!

In the latest video, we have been exploring the validation of record types modeling domain entities. You can watch the entire video on YouTube: https://youtu.be/dnLRVSpVd24

The problem we are investigating is that of maintaining the ๐˜ƒ๐—ฎ๐—น๐—ถ๐—ฑ๐—ถ๐˜๐˜† ๐—ผ๐—ณ ๐—ฎ ๐—ฟ๐—ฒ๐—ฐ๐—ผ๐—ฟ๐—ฑ ๐—ผ๐—ฏ๐—ท๐—ฒ๐—ฐ๐˜. Record immutability is objectively of great help there. We are only required to establish validity rules at the object's creation point.

However frightening the question of validation is, especially when applied to domain entities, which are naturally the most complex types in the model, the solution is surprisingly straightforward. Establish a single point for validation, typically in the form of a factory function. Then, force all execution paths through that point. Done!

The core message of this week's video, and of this newsletter, too, is that functional design helps you reduce the code, removing needless complexity. Entity records validation is a typical exemplar of that magnificent simplifying effect.

As usual, here are some additional learning resources.

๐—™๐˜‚๐—ป๐—ฐ๐˜๐—ถ๐—ผ๐—ป๐—ฎ๐—น ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ด ๐—ถ๐—ป ๐—–# by Enrico Buonanno will teach you the virtue of designing proper functional models using modern C# codinghelmet.com/go/buonanno-functional-programminโ€ฆ
๐——๐—ผ๐—บ๐—ฎ๐—ถ๐—ป ๐— ๐—ผ๐—ฑ๐—ฒ๐—น๐—ถ๐—ป๐—ด ๐— ๐—ฎ๐—ฑ๐—ฒ ๐—™๐˜‚๐—ป๐—ฐ๐˜๐—ถ๐—ผ๐—ป๐—ฎ๐—น by Scott Wlaschin is an evergreen codinghelmet.com/go/wlaschin-functional-modeling-mโ€ฆ

And, if you are ready to invest more effort in learning, here are some courses you may be interested in:
๐—•๐—ฒ๐—ด๐—ถ๐—ป๐—ป๐—ถ๐—ป๐—ด ๐—ข๐—ฏ๐—ท๐—ฒ๐—ฐ๐˜-๐—ข๐—ฟ๐—ถ๐—ฒ๐—ป๐˜๐—ฒ๐—ฑ ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ด ๐˜„๐—ถ๐˜๐—ต ๐—–# at Udemy codinghelmet.com/go/beginning-oop-with-csharp
๐—”๐—ฑ๐˜ƒ๐—ฎ๐—ป๐—ฐ๐—ฒ๐—ฑ ๐—–# ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ด ๐—ถ๐—ป .๐—ก๐—˜๐—ง ๐—–๐—ผ๐—ฟ๐—ฒ at Coursera codinghelmet.com/go/advanced-csharp-programming
.๐—ก๐—˜๐—ง ๐—–๐—ผ๐—ฟ๐—ฒ ๐— ๐—ฎ๐˜€๐˜๐—ฒ๐—ฟ๐˜† at Coursera codinghelmet.com/go/dotnet-core-mastery
๐—•๐—ฎ๐—ฐ๐—ธ-๐—˜๐—ป๐—ฑ ๐——๐—ฒ๐˜ƒ๐—ฒ๐—น๐—ผ๐—ฝ๐—บ๐—ฒ๐—ป๐˜ ๐˜„๐—ถ๐˜๐—ต .๐—ก๐—˜๐—ง at Coursera codinghelmet.com/go/backend-development-with-dotneโ€ฆ

๐——๐—ถ๐˜€๐—ฐ๐—น๐—ผ๐˜€๐˜‚๐—ฟ๐—ฒ: This post contains affiliate links. If you make a purchase through those links, I will earn a small amount.

2 weeks ago | [YT] | 45

Zoran on C#

Are you solving this year's Advent of Code? You can find the new puzzles at address: adventofcode.com/

As you solve each of the puzzles, you can compare your solution with my take on it.ย 
Here is the GitHub repo in which I will post C# solutions to daily puzzles, done my way: github.com/zoran-horvat/advent-of-code-2025

Enjoy solving the puzzles!

3 weeks ago | [YT] | 45

Zoran on C#

The topic for this week is: ๐๐ž๐œ๐ฅ๐š๐ซ๐š๐ญ๐ข๐ฏ๐ž ๐œ๐จ๐๐ข๐ง๐  ๐ข๐ง ๐‚#๏ผ

In the latest YouTube video, I was demonstrating the use of property patterns to write intention-revealing code in C#, contrary to traditional, imperative logic largely based on branching. You can watch the full video here: https://youtu.be/BMJaFunQdE8

Most of the business-oriented code we write today may still be procedural or imperative. But the C# language has already made giant leaps toward ๐›๐ž๐œ๐จ๐ฆ๐ข๐ง๐  ๐๐ž๐œ๐ฅ๐š๐ซ๐š๐ญ๐ข๐ฏ๐ž with features likeย LINQ,ย higher-order functions,ย switch expressions,ย expression-bodied members,ย record types,ย range syntax,ย property and list patterns...

The fear of losing control over your code is false. Describe what you want, and let the compiler decide how to accomplish it. Chances are that the compiler will beat your solution anyway. As a bonus, the future, improved compilers will further improve the performance of your declarative code. ๐˜๐จ๐ฎ๐ซ ๐œ๐จ๐๐ž ๐ฐ๐ข๐ฅ๐ฅ ๐›๐ž ๐Ÿ๐š๐ฌ๐ญ๐ž๐ซ ๐š๐ฌ ๐ข๐ญ ๐š๐ ๐ž๐ฌ๏ผ

If you want to grow as a C# programmer, then ๐ฌ๐ญ๐š๐ซ๐ญ ๐ฅ๐ž๐š๐ง๐ข๐ง๐  ๐ข๐ง๐ญ๐จ ๐š ๐๐ž๐œ๐ฅ๐š๐ซ๐š๐ญ๐ข๐ฏ๐ž ๐ฆ๐ข๐ง๐๐ฌ๐ž๐ญ. It is the direction the language is moving, and the direction your codebase will inevitably follow.

Further Learning

As usual, here are the learning resources that will help you move in the right direction.
1. Enrico Buonanno's ๐…๐ฎ๐ง๐œ๐ญ๐ข๐จ๐ง๐š๐ฅ ๐๐ซ๐จ๐ ๐ซ๐š๐ฆ๐ฆ๐ข๐ง๐  ๐ข๐ง ๐‚# will teach you the virtues of functional thinking codinghelmet.com/go/buonanno-functional-programminโ€ฆ
2. Dave Farley's ๐Œ๐จ๐๐ž๐ซ๐ง ๐’๐จ๐Ÿ๐ญ๐ฐ๐š๐ซ๐ž ๐„๐ง๐ ๐ข๐ง๐ž๐ž๐ซ๐ข๐ง๐  book will help you keep the big picture in sight codinghelmet.com/go/modern-software-engineering-boโ€ฆ
3. Stanford University's 4-course series ๐€๐ฅ๐ ๐จ๐ซ๐ข๐ญ๐ก๐ฆ๐ฌ ๐’๐ฉ๐ž๐œ๐ข๐š๐ฅ๐ข๐ณ๐š๐ญ๐ข๐จ๐ง will make sure you have a good understanding of the fundamentals before adopting higher-level principles codinghelmet.com/go/coursera-stanford-algorithms

I am sure you will find some good learning materials in these resources!

Disclosure: This post contains affiliate links. If you make a purchase through those links, I will earn a small amount.

3 weeks ago | [YT] | 78

Zoran on C#

The topic for this week is: ๐๐š๐ญ๐š ๐œ๐ซ๐ฎ๐ง๐œ๐ก๐ข๐ง๐ !

The latest video has demonstrated a very narrow technique that can save your server under extreme load: streaming JSON directly from the request body instead of deserializing the full array up front. Watch the video here: https://youtu.be/hlhAZgFp9xg

However, the technique shown in the video is only a tiny part of a much broader set of techniques.

To put this into context, there are three main ways to process incoming data:
- ๐…๐ฎ๐ฅ๐ฅ ๐๐š๐ญ๐š โ€” Load everything at once; iterate fast as hell, but spend lots of memory.
- ๐’๐ญ๐ซ๐ž๐š๐ฆ๐ข๐ง๐  โ€” Process items as they arrive; iterate at a much slower rate, but only spend a constant amount of memory.
- ๐‚๐ก๐ฎ๐ง๐ค๐ข๐ง๐  โ€” The middle ground; amortize streaming time over the batch size, taking the best of both approaches.

If you wish to improve your knowledge, then you can investigate the examples and applications of streaming and chunking. That should give every programmer a different perspective on designing data intensive applications.

Further Learning

As usual, here are some additional learning resources.
- One of the most influential books on the theory of algorithms, ๐ˆ๐ง๐ญ๐ซ๐จ๐๐ฎ๐œ๐ญ๐ข๐จ๐ง ๐ญ๐จ ๐€๐ฅ๐ ๐จ๐ซ๐ข๐ญ๐ก๐ฆ๐ฌ by Thomas Cormen et al. codinghelmet.com/go/introduction-to-algorithms-booโ€ฆ
- One of the most detailed books I have read in recent years, ๐ƒ๐ž๐ฌ๐ข๐ ๐ง๐ข๐ง๐  ๐ƒ๐š๐ญ๐š-๐ˆ๐ง๐ญ๐ž๐ง๐ฌ๐ข๐ฏ๐ž ๐€๐ฉ๐ฉ๐ฅ๐ข๐œ๐š๐ญ๐ข๐จ๐ง๐ฌ by Martin Kleppmann, et al. codinghelmet.com/go/book-designing-data-intensive-โ€ฆ
- Or, if you are looking for something completely different, you may try Enrico Buonanno's ๐…๐ฎ๐ง๐œ๐ญ๐ข๐จ๐ง๐š๐ฅ ๐๐ซ๐จ๐ ๐ซ๐š๐ฆ๐ฆ๐ข๐ง๐  ๐ข๐ง ๐‚# codinghelmet.com/go/buonanno-functional-programminโ€ฆ
- Finally, if you wish to pass through some serious curriculum, you may wish to attend the ๐€๐ฅ๐ ๐จ๐ซ๐ข๐ญ๐ก๐ฆ๐ฌ ๐’๐ฉ๐ž๐œ๐ข๐š๐ฅ๐ข๐ณ๐š๐ญ๐ข๐จ๐ง course series from Stanford University on Coursera codinghelmet.com/go/coursera-stanford-algorithms

I am sure you will find some good learning materials in these resources!

Disclosure: This post contains affiliate links. If you make a purchase through those links, I will earn a small amount.

1 month ago | [YT] | 70

Zoran on C#

Several viewers have asked for additional learning resources after my recent video on Big-O notation and algorithms. You can watch the video here: https://youtu.be/XlkBOxdlSzo

Learning the theory of algorithms is one of the best ways to grow as a programmer, whether or not you use AI tools. It sharpens your intuition, helps you reason about the tradeoffs you make, and gives you confidence when facing new problems.

If youโ€™d like to dive deeper, here are two excellent resources I highly recommend:
๐Ÿ“˜ The famous "Introduction to Algorithms" book by Thomas Cormen, et al. codinghelmet.com/go/introduction-to-algorithms-booโ€ฆ
๐ŸŽ“ Stanford Universityโ€™s "Algorithms Specialization" 4-course series on Coursera codinghelmet.com/go/coursera-stanford-algorithms


Disclosure: This post contains affiliate links. If you make a purchase through those links, I will earn a small amount.

1 month ago | [YT] | 16

Zoran on C#

Would you be interested in learning about building MCP clients and servers in .NET on my YouTube channel?

1 month ago | [YT] | 36

Zoran on C#

On May 30th I will be holding a full-day workshop about utilizing the generative AI in software development, covering all the angles from prompt engineering, over feature planning, CRUD operations, database design, domain modeling, writing tests, exploring libraries, etc.

The group of attendees will be small, hoping to incite discussion.

You can register for this event at the organizer's page. The cost is 210 EUR per seat. If your company is covering expenses, they can contact the organizers as well.

Use the code YT-GENAI-MAY2025 and contact the organizers from this page: itkonekt.com/2023/01/19/aiworkshop/.

7 months ago | [YT] | 38

Zoran on C#

The C# compiler is slow in everyday use.

1 year ago | [YT] | 17