mardi 24 octobre 2017

Saving database connection using OAuth tokens on ASP.NET Web Api

I am working on a project to add OAuth authentication for a REST Webapp.

I have been able to generate the token using Owin, however I a facing how to keep the database connection alive and reuse for several user requests.

Before our REST application, we used to save the Entity instance on the Session of the user. However, moving to REST we are looking to solve this some other way and keep the database connection for a given user alive.

Any idea how can I achieve this? Currently, to keep my localhost project moving forward I am creating a new database connection on each request.




Aucun commentaire:

Enregistrer un commentaire