C
C#2mo ago
Fattouh

Basket feature in ASP.NET with EF Core & Web API

Hey everyone, I'm working on a for an e-commerce website. I want guest users to add items before logging in, and after logging in, transfer those items to their account's basket. My main concern is: How do I identify a guest before they log in? Should I use a temporary identifier (like a cookie or local storage) or generate a session-based guest ID? What's the best approach for handling this transition smoothly?
1 Reply
Yawnder
Yawnder2mo ago
A session cookie imo. You don't want to put all that crap in your database, and you don't want to overload your servers either.

Did you find this page helpful?