Dapper Extensions Reloaded: Version 3
Published on Sunday, January 21, 2018 12:25:52 PM UTC in Announcements & Programming & Tools
A few days ago I published a new version of Dapper Extensions Reloaded on NuGet, a fork of the original Dapper Extensions I created a while ago. I've added some new features, but I also removed a lot of older stuff from the original implementation that I felt were too much "black magic" for me. Here is the full list of changes from last version.
- Add a new logging feature based on proxies of connections and commands. This has been inspired by Mini Profiler, but I didn't want to pull in that dependency just for some simple logging.
- Add a set-based update operation, and rename the already present set-based delete operation breaking change.
- Add a feature to define key columns by respective attribute. This is to make key declarations more explicit instead of the previous convention that the first auto-detected key is used and all others are ignored. This is a breaking change because the previous black magic has been removed.
- Add an overload to get a single entity with predicate argument to avoid excessive use of reflection.
- Convert remaining APIs to async, remove synchronous APIs breaking change.
- Remove automatic GUID handling magic breaking change. For some time I felt that this was just too much magic going on behind the scenes, in particular auto-settings GUID properties with COMB values generated internally.
- Remove implicit object to predicate conversion magic breaking change. A nice feature in principle, but again too much magic for my taste (for example choosing the used operator automatically).
- Remove logger in preparation of better implementation breaking change. The current logger feature required additional work on the consuming side and had some security-related issues (everybody could attach a logger, even malicious third-party components of an app).
- Remove unused internal mapper features and semantics from configuration.
- Fix Xunit warnings and rework tests to make proper use of async features.
- Changed target framework to .NET Standard 2.0 breaking change. This was motivated by the fact that tooling support for < 2.0 is brittle, and all our apps using the lib were targeting 2.0 anyway.
- Update all dependencies to latest version (in particular Dapper itself).
- More code clean-up.