-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Public access to caches and metadata in Dapper.Contrib #1109
Comments
We'll likely largely refactor these in v2, so I'm a bit against exposing things we'd almost immediately break. But it'd be helpful to know what you need - can you explain some example use cases and what you're after? That may help a bit on how we refactor things. |
Well, our team uses MS SQL sequences to generate IDs. And we want to specify the name of the sequence by the attribute: [Table("Address")]
public class Address
{
[Sequence("AddressSequence")] // this is the custom attribute
public long Id { get; set; }
// other props
} Also our IDs typically have type I think, pluggable adapters and generic |
Unfortunately, thing isn't something we can do. For example there are PRs right now that change these structures. While they're internal, that's fine. When they're public, we're handicapped on any changes as they'd then be breaking and we have to wait for another major release. Because of that, we need to keep them private so we can tweak and fix things as we re-engineer how they work (they do need to change). |
Collapsing this into #722 - that's where we'll be redesigning how this works and allowing the flexibility asked for here in v3 - that the goal. |
It would be nice to get public access to helper methods like
GetTableName
,TypePropertiesCache
,KeyPropertiesCache
(and other*Cache
) etc. Of course, I can copy-paste all these methods:) But it will be double work in development and also in runtime.But IMHO if you just change the access modifiers to
public
, the code will smell bad. Maybe introduce some static class, i.e.MetadataHelper
orTypeUtils
?The text was updated successfully, but these errors were encountered: