public async Task <IActionResult> Create([Bind("ID,Title,Job_Type,Company,FromDate,ToDate,Description,Responsibilities")] WorkExperience workExperience)
        {
            if (ModelState.IsValid)
            {
                _context.Add(workExperience);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(workExperience));
        }
Example #2
0
        public async Task <IActionResult> Create([Bind("ID,ProjectName,Description,Period,Technologies,Languages")] Projects projects)
        {
            if (ModelState.IsValid)
            {
                _context.Add(projects);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(projects));
        }
Example #3
0
        public async Task <IActionResult> Create([Bind("ID,Skill,Proficiency")] Skills skills)
        {
            if (ModelState.IsValid)
            {
                _context.Add(skills);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(skills));
        }
Example #4
0
        public async Task <ActionResult> Create(CurriculumVitae curriculumVitae, IFormFile image)
        {
            if (ModelState.IsValid)
            {
                try
                {
                    curriculumVitae.PersonalInformation.ImageFile = await GetUploadedImage(image).ConfigureAwait(false);
                }
                catch (Exception)
                {
                }
                finally
                {
                    _context.Add(curriculumVitae);
                    await _context.SaveChangesAsync().ConfigureAwait(false);
                }
                return(RedirectToAction(nameof(Index)));
            }


            return(View(curriculumVitae));
        }