public EchangeLivreController() { SQLRepositoryLivreEchange contextEchange = new SQLRepositoryLivreEchange(new MyContext()); SQLRepositoryUtilisateur contextUser = new SQLRepositoryUtilisateur(new MyContext()); serviceUser = new UtilisateurService(contextUser); serviceEchange = new EchangeLivreService(contextEchange); }
public CategoriesController() { contextUser = new SQLRepositoryUtilisateur(new MyContext()); this.contextCategorie = new SQLRepository <Categorie>(new MyContext()); this.contextLivre = new SQLRepositoryLivre(new MyContext()); this.contextWishList = new SQLRepositoryWishList(new MyContext()); serviceBook = new BookService(contextLivre); SQLRepositoryLivreEchange ech = new SQLRepositoryLivreEchange(new MyContext()); echangeService = new EchangeLivreService(ech); }