Example #1
0
        /// <summary>
        /// Imports the CSV dictionary back into Umbraco
        /// </summary>
        /// <param name="csv">The CSV entries</param>
        /// <returns></returns>
        public ImportResponse ImportCsv(string csv)
        {
            ImportResponse response = new ImportResponse
            {
                Validation = this.ValidateCsv(csv)
            };

            if (!response.Validation.IsValid)
            {
                return(response);
            }

            var dtos = response.Validation.CsvRows.ToLanguageTextDtos();

            var dictionaryService = new DictionaryDataService(appContext);

            response.Update = dictionaryService.UpdateDtoItems(dtos);

            return(response);
        }