コード例 #1
0
        public void Delete(int id)
        {
            Funcionario funcionario = FindById(id);

            _context.Remove(funcionario);
            _context.SaveChanges();
        }
コード例 #2
0
        public void Remove(int id)
        {
            Imagem imagem = _context.Image.Find(id);

            _context.Image.Remove(imagem);
            _context.SaveChanges();
        }
コード例 #3
0
        public void Delete(int id)
        {
            Cliente cliente = FindById(id);

            _context.Remove(cliente);
            _context.SaveChanges();
        }
コード例 #4
0
        public void Delete(int id)
        {
            Produto produto = FindById(id);

            _context.Produto.Remove(produto);
            _context.SaveChanges();
        }
コード例 #5
0
 public void Delete(int id)
 {
     Categoria c = FindById(id);
     if (c != null)
     {
         _context.Remove(c);
         _context.SaveChanges();
         return;
     }
     throw new ExceptionNotFoundId();
 }      
コード例 #6
0
 public void Insert(NewsLetterEmail newsLetter)
 {
     _context.NewsLetterEmail.Add(newsLetter);
     _context.SaveChanges();
 }