Static dictionaries getter and mapper

This commit is contained in:
Mikhail Shabanov committed 2020-05-30 17:15:43 +02:00
1 parent 32f7245d85
commit 36be21e61c
7 files changed
+267 -9

No files matched your search

@@ -0,0 +1,16 @@
using System.Collections.Generic;
using AutoMapper;
using WotBlitzStatisticsPro.Common.Dictionaries;
namespace WotBlitzStatisticsPro.Logic.Mappers
{
public class DictionaryLanguageMapper : Profile
{
public DictionaryLanguageMapper()
{
CreateMap<KeyValuePair<string, string>, LanguageDictionary>()
.ForMember(dest => dest.LanguageId, op => op.MapFrom(s => s.Key))
.ForMember(dest => dest.LanguageName, op => op.MapFrom(svm => svm.Value));
}
}
}