package org.example.demo.praktikum2;

import jakarta.ejb.Stateless;
import jakarta.persistence.EntityManager;
import jakarta.persistence.PersistenceContext;

@Stateless
public class AdresseService implements AdresseServiceRemote {

    @PersistenceContext
    private EntityManager em;

    @Override
    public int speichereAdresse(Adresse m) {
        em.persist(m);
        return m.getId();
    }
}
