public async Task <IActionResult> PutDelovnaMesta(int id, DelovnaMesta delovnaMesta)
        {
            if (id != delovnaMesta.DelovnaMestaID)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }
Exemple #2
0
        public async Task <IActionResult> PutZaposlen(int id, Zaposlen zaposlen)
        {
            if (id != zaposlen.ID)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }