简体   繁体   中英

How to create a WebJob for my ASP.NET Core Web Application

I have a Web Application written in ASP.NET Core 1.0 and it is using Identity(Individual User Account) for authentication. Due to the nature of my Web Application I need to do some regular background task updating data in my Entity Framework Tables and in User Account Tables.

Have been searching for this online and it requires me to create a Console Application and deploy it as a WebJob in Azure. My question is how can I setup the console application to access my Entity Framework Tables and Identity Tables?

You can start with creating a .NET Core console application then add entity framework.

Once you have EF you can scaffold the existing database so you can access the tables you created but in order to access Identity tables you should register Identity services and it to manage roles/users.

Have a look at this article explains it in detail WebJob with access to Tables and Identity Services

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM