Beispiel #1
0
        public async Task <IActionResult> PutSkills(int id, Skills skills)
        {
            if (id != skills.ID)
            {
                return(BadRequest());
            }

            _context.Entry(skills).State = EntityState.Modified;

            try
            {
                await _context.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!SkillsExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(NoContent());
        }
Beispiel #2
0
        public async Task <IActionResult> Create([Bind("RelationID,EmplID,SkillID")] EmplSkills emplSkills)
        {
            if (ModelState.IsValid)
            {
                _context.Add(emplSkills);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(emplSkills));
        }
Beispiel #3
0
        public async Task <IActionResult> Create([Bind("ID,Name,Surname,PersonalDetails")] Employees employees)
        {
            if (ModelState.IsValid)
            {
                _context.Add(employees);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(employees));
        }
Beispiel #4
0
        public async Task <IActionResult> Create([Bind("ID,Name,Description")] Skills skills)
        {
            if (ModelState.IsValid)
            {
                _context.Add(skills);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(skills));
        }