Conventional Programming with EFCore – Part 2 – Fixing Find

If you didn’t already setup Entity Scaffolding, please checkout Part 1 before continuing. DbSet.Find(Object[]) Although a powerful method, it can cause some problems. Primarily, the lack of compile time checking of the arguments. Usually, there is a bit of double checking during initial use, and then god forbids someone changes the keys. You can haveContinue reading “Conventional Programming with EFCore – Part 2 – Fixing Find”

Conventional Programming with EFCore – Part 1

When I first took a pass at writing a Framework many years ago, I thought I was so clever being able to use reflection to solve common problems. Then I learned about Expression Trees and more fun but difficult to maintain concepts. At one point I sat down and said to myself, will anyone elseContinue reading “Conventional Programming with EFCore – Part 1”

C# Puzzles – Puzzle #3: Mutable Structs

Every C# developer knows there are classes and structs, and at least once in an interview was asked about boxing. Additionally, they understand the concepts of mutable and immutable. This is where this puzzle will focus today. Note: Scroll selectively to not spoil the results. Lets jump into it. We have a class with anContinue reading “C# Puzzles – Puzzle #3: Mutable Structs”

C# Puzzles – Puzzle #2: Static Generics

For this puzzle, there is a little code snippet at the end that may help you in the future. The puzzle really isn’t super hard to figure out. Unfortunately, it is a either you know it or you don’t. Note: Scroll selectively to not spoil the results. Lets jump into it. What do you expectContinue reading “C# Puzzles – Puzzle #2: Static Generics”

The Repository Pattern isn’t an Anti-Pattern; You’re just doing it wrong.

If you already hate the Repository Pattern, I get it. You had a bad experience with it. Implementing Repos over and over again has no benefits. I 100% agree. I although have not have had the same experience, as I do not recommend that approach. I focus on a zero rework implementation. People don’t giveContinue reading “The Repository Pattern isn’t an Anti-Pattern; You’re just doing it wrong.”