Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Async factory #887

Open
amir-arad opened this issue May 31, 2018 · 5 comments
Open

Async factory #887

amir-arad opened this issue May 31, 2018 · 5 comments

Comments

@amir-arad
Copy link
Contributor

amir-arad commented May 31, 2018

Hi

Are there any plans to support async factories?

Thanks

@TheAifam5
Copy link

@amir-arad
Copy link
Contributor Author

amir-arad commented Jun 3, 2018

thanks @TheAifam5 .
I've tried that and i found out that with providers, the consumer is injected with a function that returns a promise to an entity (()=>Promise<T>), instead of simply an entity (T).

What I mean by async factory is to register something like (context)=>Promise<T> and have the consumer be injected with T.

@ifree92
Copy link

ifree92 commented Jan 19, 2019

Actually I'm looking for the same functionality.
To be able to have provided instance automatically and delegate execution async factory to inversify, instead call it manually

@episage
Copy link

episage commented Mar 11, 2019

+1, looking for the same thing for transparent Unit of Work implementation

@parisholley
Copy link
Contributor

@amir-arad @ifree92 @episage check out #1074

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

5 participants