public bool Update(Produto_Imagens entity) { _context.Entry(entity).State = EntityState.Modified; try { _context.SaveChanges(); } catch (DbUpdateConcurrencyException ex) { throw ex; } return(true); }
public ProdutoImagemDTO GetByProdutoIdAndName(int produtoId, string imagem) { Produto_Imagens entity = _repository.GetByProductIdAndName(produtoId, imagem); return(Mapper.Map <ProdutoImagemDTO>(entity)); }
public bool Delete(Produto_Imagens entity) { _context.Produto_Imagens.Remove(entity); return(_context.SaveChanges() > 0); }
public bool Insert(Produto_Imagens entity) { _context.Produto_Imagens.Add(entity); return(_context.SaveChanges() > 0); }