tugberkugurlu / AspNetCore.Identity.MongoDB

MongoDB Data Store Adaptor for ASP.NET Core Identity
MIT License
230 stars 69 forks source link

MongoUserStore should have a static factory method instead of ctor #35

Closed tugberkugurlu closed 5 years ago

tugberkugurlu commented 7 years ago

MongoUserStore ctor potentially performs an expensive I/O operation. Because of this, we should expose a factory method rather than making this part of the ctor.

zokkan commented 7 years ago

Hi @tugberkugurlu , will you continue to work on issues?

Thank you.

tugberkugurlu commented 7 years ago

Hi @zokkan! Yes, I was inactive on this but started finishing up a few things now to target ASP.NET Core Identity v2. Let me know if you want to help out!

zokkan commented 7 years ago

Hi @tugberkugurlu, I'm getting familiar so I won't be able to help, I'm looking a solution to help me instead. If I feel that I can help someday, I will inform you, promise. 😄

tugberkugurlu commented 7 years ago

Cool, this will help you. Use it 🙂

dealproc commented 5 years ago

I'm implementing this at this time, but the issue is the registration seems to still need to use .GetAwaiter().GetResult() at this point. I would be interested in either 1) use a TaskHelpers.RunSync(await () => ) method, or if @tugberkugurlu has a suggestion on how we can setup the Services collection to run async as the example to indeed run the method async as part of the singleton registration. Check-in on this will be happening momentarily.