Stop exposing mapper in MapperContext

This commit is contained in:
Stephan
2019-04-07 11:26:47 +02:00
parent 1af431a27d
commit 8049c40f90
13 changed files with 165 additions and 92 deletions

View File

@@ -45,7 +45,7 @@ namespace Umbraco.Web.Models.Mapping
if (!(target is List<Language> list))
throw new NotSupportedException($"{nameof(target)} must be a List<Language>.");
var temp = source.Select(context.Mapper.Map<ILanguage, Language>).ToList();
var temp = source.Select(context.Map<ILanguage, Language>).ToList();
//Put the default language first in the list & then sort rest by a-z
var defaultLang = temp.SingleOrDefault(x => x.IsDefault);