Ejemplo n.º 1
0
        public async Task <IActionResult> Create(SkillCreateInputModel input)
        {
            var defaultCvId = _cvService.GetId();

            if (!ModelState.IsValid)
            {
                return(View(input));
            }

            try
            {
                await _skillsService.CreateAsync(input, defaultCvId);
            }
            catch (Exception e)
            {
                _logger.LogError(e, "An exception occured during new skill record creation.");
                return(RedirectToAction("Error", "Home"));
            }

            return(RedirectToAction("Index", "Home"));
        }
Ejemplo n.º 2
0
        public IActionResult Create()
        {
            var viewModel = new SkillCreateInputModel();

            return(View(viewModel));
        }