Пример #1
0
 public ActionResult SetSettingForLocalhost(string name, string value)
 {
     if (Util.Host == "localhost")
     {
         if (value == "DELETE")
         {
             CurrentDatabase.DeleteSetting(name);
         }
         else
         {
             CurrentDatabase.SetSetting(name, value);
         }
         CurrentDatabase.SubmitChanges();
         return(Content($"{name} {value} done"));
     }
     return(Content("only valid on localhost database"));
 }