Beispiel #1
0
        public async Task <ActionResult <about_us_employee> > Postabout_us_employee(about_us_employee about_us_employee)
        {
            _context.get_about_us_employee.Add(about_us_employee);
            await _context.SaveChangesAsync();

            return(CreatedAtAction("Getabout_us_employee", new { id = about_us_employee.id }, about_us_employee));
        }
Beispiel #2
0
        public async Task <IActionResult> Putabout_us_employee(int id, about_us_employee about_us_employee)
        {
            if (id != about_us_employee.id)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }