DRMFSS.BLL.UserProfile.ChangeLanguage C# (CSharp) Method

ChangeLanguage() public method

public ChangeLanguage ( string lang ) : void
lang string
return void
        public void ChangeLanguage(string lang)
        {
            BLL.CTSContext context = new BLL.CTSContext();

            UserProfile profile = context.UserProfiles.Where(p=>p.UserName == this.UserName).SingleOrDefault();
            if(profile != null)
            {
                profile.LanguageCode = lang;
                context.SaveChanges();
            }
        }