Phil Scott's Postings

UsedImplicitly on External Libraries

Published on

Command Line Verbs and MediatR

Published on

Verbs are a way to split our console application in distinct actions within an app. If you've used the git command line you've encountered them. git clone, git commit, etc are all each verbs. Each one of those verbs has its own set of options and even help text. It's like having many command line apps within one master application.

Read more about Command Line Verbs and MediatR

Better Tagging of EF Core Queries

Published on

One of the quickest ways to earn the ire of a DBA is to shrug your shoulders, and tell them you don't know what code created the query that is slowing down their server. Sure, with a little hunting and knowledge of the code base you can generally spot the offending query, but wouldn't it be nice if the query the DBA is looking at had more information to track it down?

Read more about Better Tagging of EF Core Queries

CQRS Repository with EF Core

Published on

Chances are the only reason you clicked on this article was to scroll right to the comments so you can call me an idiot. "DbSet IS a repository!" you are here to tell me. Well yes. But maybe, just maybe, we can have a bit of a better repository. We'll leave all the functionality on the existing DbSet and expose it directly. Our main work will be wrapping up our DbContext and adding a little extra to make things a bit easier when working in a CQRS architecture.

Read more about CQRS Repository with EF Core

Playing with EF Core 5 and Stack Overflow Data

Published on

Entity Framework Core 5 is starting to take shape with Preview 7 being released in late July. When I need to play with new data code, I like to use the Stack Exchange Data Dump. These are The schema is simple enough, but with the variety of sized databases you can grab one that has enough data to make querying against a SQL Server a little more like live fire especially when looking at execution plans.

Read more about Playing with EF Core 5 and Stack Overflow Data