private void AddScript() { var command = new ScriptCreateCommand(NewContent, NewSection); scriptApplicationService.Create(command); AddMode = false; ReloadScripts(); }
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()); } }