public async Task <CategoriaReceita> Alterar(CategoriaReceita categoriaReceita)
 {
     using (InstitutoFriggaContext _context = new InstitutoFriggaContext())
     {
         _context.Entry(categoriaReceita).State = EntityState.Modified;
         await _context.SaveChangesAsync();
     }
     return(categoriaReceita);
 }
Beispiel #2
0
 public async Task <Produto> Alterar(Produto produto)
 {
     using (InstitutoFriggaContext _context = new InstitutoFriggaContext())
     {
         _context.Entry(produto).State = EntityState.Modified;
         await _context.SaveChangesAsync();
     }
     return(produto);
 }
Beispiel #3
0
 public async Task <Usuario> Alterar(Usuario usuario)
 {
     using (InstitutoFriggaContext _context = new InstitutoFriggaContext())
     {
         _context.Entry(usuario).State = EntityState.Modified;
         await _context.SaveChangesAsync();
     }
     return(usuario);
 }
 public async Task <Oferta> Alterar(Oferta oferta)
 {
     using (InstitutoFriggaContext _context = new InstitutoFriggaContext())
     {
         _context.Entry(oferta).State = EntityState.Modified;
         await _context.SaveChangesAsync();
     }
     return(oferta);
 }
 public async Task <Endereco> Alterar(Endereco endereco)
 {
     using (InstitutoFriggaContext _context = new InstitutoFriggaContext())
     {
         _context.Entry(endereco).State = EntityState.Modified;
         await _context.SaveChangesAsync();
     }
     return(endereco);
 }
Beispiel #6
0
        public async Task <Receita> Excluir(Receita receita)
        {
            using (InstitutoFriggaContext _context = new InstitutoFriggaContext())
            {
                _context.Receita.Remove(receita);
                await _context.SaveChangesAsync();

                return(receita);
            }
        }
Beispiel #7
0
        public async Task <Usuario> Excluir(Usuario usuario)
        {
            using (InstitutoFriggaContext _context = new InstitutoFriggaContext())
            {
                _context.Usuario.Remove(usuario);
                await _context.SaveChangesAsync();

                return(usuario);
            }
        }
        public async Task <Endereco> Excluir(Endereco endereco)
        {
            using (InstitutoFriggaContext _context = new InstitutoFriggaContext())
            {
                _context.Endereco.Remove(endereco);
                await _context.SaveChangesAsync();

                return(endereco);
            }
        }
Beispiel #9
0
        public async Task <Produto> Excluir(Produto produto)
        {
            using (InstitutoFriggaContext _context = new InstitutoFriggaContext())
            {
                _context.Produto.Remove(produto);
                await _context.SaveChangesAsync();

                return(produto);
            }
        }
        public async Task <Oferta> Excluir(Oferta oferta)
        {
            using (InstitutoFriggaContext _context = new InstitutoFriggaContext())
            {
                _context.Oferta.Remove(oferta);
                await _context.SaveChangesAsync();

                return(oferta);
            }
        }
        public async Task <CategoriaProduto> Excluir(CategoriaProduto categoriaProduto)
        {
            using (InstitutoFriggaContext _context = new InstitutoFriggaContext())
            {
                _context.CategoriaProduto.Remove(categoriaProduto);
                await _context.SaveChangesAsync();

                return(categoriaProduto);
            }
        }
        public async Task <CategoriaReceita> Excluir(CategoriaReceita categoriaReceita)
        {
            using (InstitutoFriggaContext _context = new InstitutoFriggaContext())
            {
                _context.CategoriaReceita.Remove(categoriaReceita);
                await _context.SaveChangesAsync();

                return(categoriaReceita);
            }
        }
Beispiel #13
0
        public async Task <Receita> Salvar(Receita receita)
        {
            using (InstitutoFriggaContext _context = new InstitutoFriggaContext())
            {
                await _context.AddAsync(receita);

                await _context.SaveChangesAsync();

                return(receita);
            }
        }
Beispiel #14
0
        public async Task <Usuario> Salvar(Usuario usuario)
        {
            using (InstitutoFriggaContext _context = new InstitutoFriggaContext())
            {
                await _context.AddAsync(usuario);

                await _context.SaveChangesAsync();

                return(usuario);
            }
        }
        public async Task <Oferta> Salvar(Oferta oferta)
        {
            using (InstitutoFriggaContext _context = new InstitutoFriggaContext())
            {
                await _context.AddAsync(oferta);

                await _context.SaveChangesAsync();

                return(oferta);
            }
        }
        public async Task <Endereco> Salvar(Endereco endereco)
        {
            using (InstitutoFriggaContext _context = new InstitutoFriggaContext())
            {
                await _context.AddAsync(endereco);

                await _context.SaveChangesAsync();

                return(endereco);
            }
        }
        public async Task <CategoriaReceita> Salvar(CategoriaReceita categoriaReceita)
        {
            using (InstitutoFriggaContext _context = new InstitutoFriggaContext())
            {
                await _context.AddAsync(categoriaReceita);

                await _context.SaveChangesAsync();

                return(categoriaReceita);
            }
        }
Beispiel #18
0
        public async Task <Produto> Salvar(Produto produto)
        {
            using (InstitutoFriggaContext _context = new InstitutoFriggaContext())
            {
                await _context.AddAsync(produto);

                await _context.SaveChangesAsync();

                return(produto);
            }
        }