Пример #1
0
        public ActionResult MineRules(MiningViewModel model)
        {
            try
            {
                _validations.TaskNameIsValid(Identity, model.TaskName);
            }
            catch (ValidationException e)
            {
                ModelState.AddModelError("Name", e.Message);
                return(View("Mine", _engine.GetMiningViewModel(model.Id)));
            }
            _engine.MineRules(Identity, model.Id, model);
            var modelNotification =
                "Your task was succesfully sent to LispMiner. You can see its state below.";

            return(RedirectToAction("Index", new { notification = modelNotification }));
        }