EF Core Relationships Made Simple: Primary Keys, Foreign Keys, and Navigation Properties

Database relationships sounded much more complicated to me when people started throwing around terms like: primary key foreign key navigation property one-to-many many-to-many But the basic idea is something we…

Continue ReadingEF Core Relationships Made Simple: Primary Keys, Foreign Keys, and Navigation Properties

Why Put Business Logic in a Service Instead of Stuffing Everything Into an ASP.NET Core Controller?

When building an MVC application, it is very easy to keep adding code to a controller. At first, the action looks harmless: public IActionResult Create() { return View(); } Then…

Continue ReadingWhy Put Business Logic in a Service Instead of Stuffing Everything Into an ASP.NET Core Controller?