[Question] How to create where condition from dictionary of values?
See original GitHub issueHow to create where condition from dictionary of values? I have dictionary that contains values for where conditions
var pkkeys = new Dictionary<string, object>
{
{ "pkkey1", "value1" },
{ "pkkey2", "value2" }
}
I need to create something like this
db.GetTable<SomeTable>().Where(t => t.pkkey1 == "value1" && t.pkkey2 == "value2");
Thanks
Issue Analytics
- State:
- Created 5 years ago
- Comments:25 (14 by maintainers)
Top Results From Across the Web
How to create where condition from dictionary of Key and ...
How to create a where condition from the dictionary of key and value pairs? I have a dictionary that contains values for where...
Read more >Python | Select dictionary with condition given key greater ...
Approach: Create a new empty dictionary; Iterate over the key-value pairs in the original dictionary using a for loop; If the key is...
Read more >Dictionaries | Basics | kdb+ and q documentation
Use Dict to make a dictionary from a list of keys and a list of values. ... The lists must be the same...
Read more >Python Dictionary Comprehension Tutorial
First, we create a dictionary named a that has three key-value pairs: 'apple': ... You often need to add conditions to a solution...
Read more >Modifying values in a dictionary
Create a dictionary where each key is a person's name, and each value is that person's response to your question. Store at least...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@ifle, here we go. Extension methods:
And usage
Closing as answered