mirror of
https://github.com/DrMboga/WotBlitzStatisticsBlazor.git
synced 2026-10-23 19:30:06 +02:00
Static dictionaries getter and mapper
This commit is contained in:
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));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user