This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// NestedFieldNameConvention | |
// we want to nest only lists of objects not previously mapped to a specific type by EPiServer Find | |
if ((type.GetGenericTypeDefinition() == typeof(IEnumerable<>)) | |
&& !(type.GetGenericArguments()[0].IsValueType || type.GetGenericArguments()[0] == typeof(string) || type.GetGenericArguments()[0] == typeof(DateTime) || type.GetGenericArguments()[0] == typeof(CultureInfo)) | |
&& !fieldName.Contains("$$") | |
&& !fieldName.StartsWith("__")) | |
{ | |
fieldName += "$$nested"; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class DictionariesWithGeolocation | |
{ | |
[Fact] | |
public void FilterByValueInDictionary() | |
{ | |
new Story("Filter by matching a key/geolocation in a dictionary") | |
.InOrderTo("be able to filter on a geolocation of a specific key in a dictionary") | |
.AsA("developer") | |
.IWant("to be able to map dictionaries to their correct value type") | |
.WithScenario("map dictionaries to their correct value type") |
NewerOlder