Example #1
0
        private LanguageProfile AddDefaultProfile(string name, Language cutoff, params Language[] allowed)
        {
            var languages = Language.All
                            .OrderByDescending(l => l.Name)
                            .Select(v => new LanguageProfileItem {
                Language = v, Allowed = allowed.Contains(v)
            })
                            .ToList();

            var profile = new LanguageProfile
            {
                Name      = name,
                Cutoff    = cutoff,
                Languages = languages,
            };

            return(Add(profile));
        }
Example #2
0
 public void Update(LanguageProfile profile)
 {
     _profileRepository.Update(profile);
 }
Example #3
0
 public LanguageProfile Add(LanguageProfile profile)
 {
     return(_profileRepository.Insert(profile));
 }