public ActionResult FrequencyEdit(FrequencySchedule frequency)
 {
     if (ModelState.IsValid)
     {
         var setting = db.Settings.Find(frequency.Id);
         setting.SetValue(frequency);
         db.Entry(setting).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("FrequencySchedule"));
     }
     return(View(frequency));
 }
        public ActionResult FrequencyCreate([Bind(Include = "Id,Language,Desc,Publish")] FrequencySchedule frequency)
        {
            frequency.DateCreated = DateTime.Now;
            var setting = new Setting {
                Name = typeof(FrequencySchedule).Name
            };

            setting.SetValue(frequency);
            if (ModelState.IsValid)
            {
                db.Settings.Add(setting);
                db.SaveChanges();
                return(RedirectToAction("FrequencySchedule"));
            }
            return(View(frequency));
        }