Example #1
0
        public async Task <ActionResult <VagaEstoque> > PostVagaEstoque(VagaEstoque vagaEstoque)
        {
            _context.VagasEstoque.Add(vagaEstoque);
            await _context.SaveChangesAsync();

            return(CreatedAtAction("GetVagaEstoque", new { id = vagaEstoque.Id }, vagaEstoque));
        }
Example #2
0
        public async Task <IActionResult> PutVagaEstoque(int id, VagaEstoque vagaEstoque)
        {
            if (id != vagaEstoque.Id)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }
Example #3
0
 public void Update(VagaEstoque ve)
 {
     _context.VagasEstoque.Update(ve);
 }
Example #4
0
 public void Remove(VagaEstoque ve)
 {
     _context.VagasEstoque.Remove(ve);
 }
Example #5
0
 public async Task AddAsync(VagaEstoque ve)
 {
     await _context.VagasEstoque.AddAsync(ve);
 }
 Task IServico <VagaEstoque> .Salvar(VagaEstoque ent)
 {
     throw new NotImplementedException();
 }