Пример #1
0
        // GET: ScriptController
        public ActionResult Index()
        {
            var result  = scriptApplicationService.GetAll();
            var scripts = result.Scripts.Select(x => new ScriptResponseModel(x.Id, x.Content, x.Section)).ToList();

            return(View(scripts));
        }
        private void ReloadScripts()
        {
            AddMode  = false;
            EditMode = false;

            var result = scriptApplicationService.GetAll();

            var scripts = new List <ScriptResponseModel>(result.Scripts.Select(x => new ScriptResponseModel(x.Id, x.Content, x.Section)).ToList());

            Scripts = new ObservableCollection <ScriptResponseModel>(scripts);
        }