Skip to content

Commit 6e68350

Browse files
committed
classe dao do produto
1 parent eb051db commit 6e68350

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)