TypeORM: What does useContainer do?

884 views Asked by At

according to docs, if I want to use a service container like typedi I should use "useContainer" method:

import {useContainer, createConnection} from "typeorm";
import {Container} from "typedi";

// its important to setup container before you start to work with TypeORM
useContainer(Container);
createConnection({/* ... */});

why should I use that method? what is the benefit?

0

There are 0 answers