You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The code give this error:
Instance property 'department' is not defined for type 'System.Collections.Generic.Dictionary`2[System.String,System.Object]' (Parameter 'propertyName')
The text was updated successfully, but these errors were encountered:
Is it possible to apply the filter on a Dictionary<string, object>
I have this code
List<Dictionary<string, object>> products = []; // Product 1 Dictionary<string, object> product1 = new() { { "Department", "Wireless Mouse" }, { "Name", "Razer" }, { "Price", 10 }, { "InStock", 1 }, }; products.Add(product1); // Product 2 Dictionary<string, object> product2 = new() { { "Department", "Wireless Mouse" }, { "Name", "Logitech" }, { "Price", 20 }, { "InStock", 0 }, }; products.Add(product2); return products.BuildQuery(rule).FirstOrDefault();
The code give this error:
Instance property 'department' is not defined for type 'System.Collections.Generic.Dictionary`2[System.String,System.Object]' (Parameter 'propertyName')
The text was updated successfully, but these errors were encountered: