AutoMapperMappingExtensions был не обработан пользователем
Я разрабатываю приложения, они включают выпадающий список с изображением и текстом в MVC4. Например, отображение изображения (Флаг страны) с названием страны. Я использовал AutoMapper, IEnumerable. Это говорит об ошибке, так как AutoMapperMappingExtensions был не обработан пользователем.
Описание как
Missing type map configuration or unsupported mapping.
Mapping types:
Country -> ImageSelectListItem
MvcWebRole.Models.Country -> System.Web.Mvc.Html.ImageSelectListItem
Destination path:
IEnumerable`1[0]
Source value:
MvcWebRole.Models.Country
Появление ошибки в Controller as
Mapper.Map<IEnumerable<Country>, IEnumerable<ImageSelectListItem>>(countryList)
index.cshtml
@Html.DropDownListFor
В cshtml описание ошибки как
The type arguments for method
'System.Web.Mvc.html.ImageselectExtensions.dropdownlistfo<TModel,TProperty> (
System.Web.mvc.htmlhelper<TModel>,
System.Linq.Expression<System.Func<TModel,TProperty>>,
string,
System.Collections.Generic.IEnumerable<System.Web.Mvc.Html.ImageSelectListItem>,
Object)'
cannot be inferred from the usage. Try Specifying the type arguments explicitly.