public CultureIndexViewModel GetCultures()
        {
            var model = new CultureIndexViewModel();
              var wc = _wca.GetContext();
              {
            var _sessionLocator = wc.Resolve<ISessionLocator>();
            using (var session = _sessionLocator.For(typeof(TranslationRecord)))
            {
              var cultures =
              (from t in session.Linq<TranslationRecord>()
               group t by t.Culture
                 into c
                 select new
                 {
                   c.First().Culture,
                   Count = c.Count()
                 }
              ).ToList();
              foreach (var culture in cultures)
              {
            model.TranslationStates.Add(
                culture.Culture,
                new CultureIndexViewModel.CultureTranslationState { NumberOfTranslatedStrings = culture.Count });
              }
              model.NumberOfStringsInDefaultCulture = GetNumberOfTranslatableStrings(session);
            }

            foreach (var cult in _cultureManager.ListCultures())
            {
              if (!model.TranslationStates.ContainsKey(cult))
            model.TranslationStates.Add(cult, new CultureIndexViewModel.CultureTranslationState { NumberOfTranslatedStrings = 0 });
            }

            return model;
              }
        }
        public CultureIndexViewModel GetCultures()
        {
            var model = new CultureIndexViewModel();
            var cultures = _translationRepository.Table
                    .ToList()
                    .GroupBy(t => t.Culture)
                    .Select(g => new
                    {
                        g.First().Culture,
                        Count = g.Count()
                    });

            cultures.ForEach(c =>
            {
                model.TranslationStates.Add(
                        c.Culture,
                        new CultureIndexViewModel.CultureTranslationState { NumberOfTranslatedStrings = c.Count });
            });

            model.NumberOfStringsInDefaultCulture = GetNumberOfTranslatableStrings();
            foreach (var cult in _cultureManager.ListCultures())
            {
                if (!model.TranslationStates.ContainsKey(cult))
                    model.TranslationStates.Add(cult, new CultureIndexViewModel.CultureTranslationState { NumberOfTranslatedStrings = 0 });
            }

            return model;
        }