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
View 2 replies
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
View 0 replies
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
View 0 replies
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
View 2 replies
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
View 4 replies
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
View 1 reply
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
View 0 replies
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
View 17 replies
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
View 3 replies
Zoran on C#
The C# compiler is slow in everyday use.
1 year ago | [YT] | 17
View 28 replies
Load more