[CSHARP-481] Implement Dictionary<String, T>.ContainsKey in Linq Provider Created: 30/May/12 Updated: 02/Apr/15 Resolved: 04/Jun/12 |
|
| Status: | Closed |
| Project: | C# Driver |
| Component/s: | None |
| Affects Version/s: | 1.4.2 |
| Fix Version/s: | 1.5 |
| Type: | New Feature | Priority: | Major - P3 |
| Reporter: | Tim Kellogg | Assignee: | Robert Stam |
| Resolution: | Done | Votes: | 0 |
| Labels: | dict, linq | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Mongo v2.0.3, C# Driver v1.4.2 |
||
| Backwards Compatibility: | Fully Compatible |
| Description |
|
Can we please implement Dictionary<String, T>.ContainsKey in the Linq provider? It seems like this would be appropriate. |
| Comments |
| Comment by Robert Stam [ 30/May/12 ] | |||||||||
|
Note to implementer: at the same time consider other methods, including extension methods, of IDictionary<TKey, TValue> that would be appropriate to implement. | |||||||||
| Comment by Robert Stam [ 30/May/12 ] | |||||||||
|
And here's a workaround for now:
which uses the Inject method to inject a standard MongoDB query into a LINQ query. | |||||||||
| Comment by Robert Stam [ 30/May/12 ] | |||||||||
|
Sample code to reproduce using this class:
and a query like this:
|