private void AddScript()
        {
            var command = new ScriptCreateCommand(NewContent, NewSection);

            scriptApplicationService.Create(command);
            AddMode = false;
            ReloadScripts();
        }
Пример #2
0
 public ActionResult Create(IFormCollection collection, ScriptCreateRequestModel scriptCreateRequestModel)
 {
     try
     {
         var content = scriptCreateRequestModel.Content;
         var section = scriptCreateRequestModel.Section;
         var command = new ScriptCreateCommand(content, section);
         scriptApplicationService.Create(command);
         return(RedirectToAction(nameof(Index)));
     }
     catch
     {
         return(View());
     }
 }