try-catch-FAIL

Failure is inevitable

NAVIGATION - SEARCH

Adding Entity Framework Code-First Type Configs from a Namespace

A recent project I worked on needed to connect to two different SQL databases using Entity Framework (version 6, not that new EF Core hotness). Out of the box, EF can only bulk-load code-based mappings from an entire assembly, not from a single namespace within an assembly. That didn't work on this project since all of the entities lived in a single assembly. Here's an extension method I wrote to work around this problem. Brace yourself: thar' be reflection here!! More...