Hope I can get some help here.
I created a custom content type through module builder, called "Our People".
Simply, "Our People" only has two fields, Name(text field), and a photo(image select field). Photo field is created by the module builder, so the relation is created, I suppose.
Now I need to display all the "Our People" in a MVC widget. How can I get the image URLs in the controller and put them into the viewmodel?
The following codes are not working at all
var myCollection = dynamicModuleManager.GetDataItems(ourPeopleType).Where(i => i.Status == Telerik.Sitefinity.GenericContent.Model.ContentLifecycleStatus.Live && i.Visible == true)
.Select(i => new OurPeopleModel
Name = i.GetValue<