Beispiel #1
0
        public async Task <IActionResult> PutOffDay(long id, OffDay offDay)
        {
            if (id != offDay.ID)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }
        public async Task <IActionResult> PutPersonel(long id, Personel personel)
        {
            if (id != personel.ID)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }