Exemplo n.º 1
0
        /// <summary>
        /// Dynamics the translation for.
        /// </summary>
        /// <param name="key">The key.</param>
        /// <returns>The List of <see cref="Mvc.RoadsServiceClient.DynamicTranslationsData"/>.</returns>
        public static List<DynamicTranslationsData> GetDynamicTranslationFor(IRoadsService client, string key)
        {
            var languages = client.GetAllLanguages();

                return client.GetDynamicTranslationData(key).Select(s => new DynamicTranslationsData
                    {
                        DynamicKey = s.DynamicKey,
                        LanguageId = s.LanguageId,
                        Value = s.Value,
                        DynamicObjectId = s.DynamicObjectId,
                        Lenguage = languages.FirstOrDefault(l => l.LanguageId == s.LanguageId)
                    }).ToList();
        }