samedi 9 mai 2015

Access MVC session from web service

First of all let me say that I`ve searched for solutions but I found only the way how to enable session in Web Api which is not what I'm looking for.

Here's what I need. What`s the best approach to achieve this in mvc. Let's say I have MVC shop application. I also have mobile app which uses web api to access my application. Let's say user added 2 items to cart, then he had to left and decided to continue his shopping with mobile app. He added 2 more items. So he should have 4 in a cart. Then he came back home, he refreshes his page and it shows him that there are 4 items in cart. So... What's the best approach to share cart between web api and mvc project. I don't want to store it only in database and read/write all the time to database.

Second quesion. Is there any option to let know mobile app that user had just added something to his cart without mobile app pinging web api for this kind of information all the time?

Aucun commentaire:

Enregistrer un commentaire