I'm relatively new to working with DynamicContent and I'm wondering how to retrieve a single DynamicContent item when you don't know it's ID, only a FieldValue, Title, for example? The GetDataItem method expects and ID, so I was trying to use GetDataItems like this:
Type officeLocationType = TypeResolutionService.ResolveType(
DynamicModuleManager dynamicModuleManager = DynamicModuleManager.GetManager();
var loc = dynamicModuleManager.GetDataItems(officeLocationType).Where(i => i.GetValue<IList>(
But I am getting this error:
Database mapped field uses different type 'System.String'.
Parameter name: methodCallExpression
Actual value was re-i.FieldValue("Title").
How does one get a single DynamicContent item when you don't know the ID?