-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Dapper.Contrib - Support for composite keys in Get method #636
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
Conversation
|
|
Related: #812 (also for the new |
|
nice ! will it be available soon ?? hope so ! |
|
It's been a year and half since I proposed this quite simple change to allow multiple keys on Get method. Hi @NickCraver Cheers |
|
I am sad this never came true... @renanmt are you still somehow on this or did you give up yet? |
Hi @SwissMaWi , I'm suffering from serious lack of time to look into this. I will try my best to get back to it next month, meanwhile, I'm attaching my current working versions. You don't need to install Contrib if you just place this files in your application, since they are basically static helpers. |
|
I will try to fix. It's been almost 5 years and still not supported in Contrib. |
|
Because of the really old PR done in a branch that doesn't even exist anymore I found it a lot easier if I tried to re-implement it in a new branch from "main". Here's the link to the new PR #1614. This one can be defined as DEPRECATED. |
Hello guys.
I changed a bit the implementation of the Get method so it can also work with composite keys. I have a few tables with this design and it always annoyed me the fact that Update, Insert and Delete supported them but I had to write custom queries when I wanted to retrieve records from database.
The method still works the same way it was defined before.
But now also supports operations like this:
I was also able to optimize Update and Delete methods a bit by using a new method to retrieve all keys.
For your appreciation and code review.
Cheers