madhatter22 / LinqToLdap

C# LINQ provider built on top of System.DirectoryServices.Protocols for querying and updating LDAP servers.
MIT License
45 stars 23 forks source link

Dynamic mapping Override at runtime (and configurable) #23

Open ssteiner opened 3 years ago

ssteiner commented 3 years ago

You may remember the issue I opened a while ago about dynamically changing mappings. That is now supported in 5.0. Still, in my approach, I define an 'OverrideMapper' (implementation can be seen here). That solution works, yet is somewhat clunky. And I had to put it into LinqToLdap because it accesses various internal properties.

Do you see a better approach to have that additional mapper outside the LinqToLdap lib? Ideally I'd go back to using the mainline but that means an approach where I can override the mapping in the "this property goes there" style. This mapping actually gets configured in a GUI, then it is injected with an instance of OverrideMapper at runtime.