コード例 #1
0
 public ITranslationDefinitions <ServiceChannelVersioned, TOut> AddLanguagesDefinition <TOut>(ITranslationDefinitions <ServiceChannelVersioned, TOut> definition) where TOut : ILanguages
 {
     return(definition.AddSimpleList(
                input => input.Languages
                .OrderBy(x => x.Order)
                .Select(x => x.LanguageId),
                output => output.Languages
                ));
 }
コード例 #2
0
 public ITranslationDefinitions <ServiceChannelVersioned, TOut> AddAllAreasDefinition <TOut>(ITranslationDefinitions <ServiceChannelVersioned, TOut> definition) where TOut : IVmAreaInformation
 {
     return(definition
            .AddSimpleList(
                input => input.Areas.Where(x => x.Area.AreaTypeId == typesCache.Get <AreaType>(AreaTypeEnum.Province.ToString()))
                .Select(x => x.AreaId),
                output => output.Provinces)
            .AddSimpleList(
                input => input.Areas.Where(x => x.Area.AreaTypeId == typesCache.Get <AreaType>(AreaTypeEnum.BusinessRegions.ToString()))
                .Select(x => x.AreaId),
                output => output.BusinessRegions)
            .AddSimpleList(
                input => input.Areas.Where(x => x.Area.AreaTypeId == typesCache.Get <AreaType>(AreaTypeEnum.HospitalRegions.ToString()))
                .Select(x => x.AreaId),
                output => output.HospitalRegions)
            .AddSimpleList(
                input => input.AreaMunicipalities.Select(x => x.MunicipalityId),
                output => output.Municipalities
                ));
 }