Ejemplo n.º 1
0
        private Dictionary <string, IEnumerable <string> > GetVocabularies(User user)
        {
            var result = new Dictionary <string, IEnumerable <string> >();

            var vocabularies = _vocabularyService.GetAllExtenededUsersValues().Where(u => u.Owner == user.Id).ToList();

            var groupedVocabulary = vocabularies.GroupBy(g => g.Type).ToList();

            foreach (var vocabulary in groupedVocabulary)
            {
                if (!result.ContainsKey(vocabulary.Key))
                {
                    result.Add(vocabulary.Key, vocabulary.Select(s => string.Concat(s.Id, ";", s.Value, ";", s.CreationDate)));
                }
            }

            return(result);
        }