I am new in asp mvc. I have to create purchase bag for chosen items and I do not know how to make it properly. The thing is that i have a purchase bag initialized in baseController which is loaded first when application starts. There is a problem becaouse garbage collector deleting it and when it is needed object is created again and these items which was included in it are unavailable. My first think was to use singleton and getting the same instance of class each time, but i am affraid that it is not right approach because other user could have access for it but maybe i am wrong. If you know smart purchase bag mechanism I would be graceful.
Aucun commentaire:
Enregistrer un commentaire