Skip to content
Leonardo Porro edited this page Jul 28, 2023 · 52 revisions

Welcome, and thanks for your interest in this small library!

After years of developing data applications using C# and relational databases I ran into the same issues over and over again:

  • Disconnected entities: Classes deserialized from http request are not tracked by the DbContext.
  • Partial updates: C# doesn't have the undefined value, so null may be really null or not mapped.
  • Mapping/auto-mapping: DTOs needs to be mapped to entities leading to tons of code lines or delegation to 3rd party mapper libraries.

Tried different solutions such as:

  • GraphDiff which is great but doesn't work for .NET Core and it's performance can be improved
  • AutoMapper that doesn't handle ORMs very well and after version 9.0, all mappings has to be defined before using it, which trimmed most of my ideas.

After that I decided to get the best of those tools and try to put them togheter in a library that maps any DTO directly to already attached entities.

And this is the result, hope it works for your project!


Getting Started with Detached.Mappers!