We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent eb051db commit 6e68350Copy full SHA for 6e68350
src/main/java/dev/emanoel/modulo02/dao/ProdutoDAO.java
@@ -0,0 +1,18 @@
1
+package dev.emanoel.modulo02.dao;
2
+
3
+import dev.emanoel.modulo02.model.Produto;
4
5
+import javax.persistence.EntityManager;
6
7
+public class ProdutoDAO {
8
9
+ private EntityManager entityManager;
10
11
+ public ProdutoDAO(EntityManager entityManager) {
12
+ this.entityManager = entityManager;
13
+ }
14
15
+ public void cadastrar(Produto produto ) {
16
+ this.entityManager.persist(produto);
17
18
+}
0 commit comments