Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

Calling async function from Startup

$
0
0

I want to use identity for a new application and looking to seed the roles during the startup.  I found this thread https://stackoverflow.com/questions/42471866/how-to-creat-roles-in-asp-net-core-and-assign-it-to-user , but it's not possible to call an async function from the startup class.

And I cannot find a way of getting RoleManager injected into a controller constructor.  Any advice on where to start with this?

I've simply created a vanilla Core v1.1 website with the basic authentication set up using VS2017.  It's otherwise untouched and I am at first base. 


Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>