I have to create an online shop for my final project. This is to have a cart where users can place articles even though they aren’t logged on. When they log on the cart should be saved to the user.
Is it possible to save the data client side until the user logs in?
You can store the cart on the server side as a guest (random user GUID) until the user signs in and then convert the cart to the authenticated user. An EXACT sample application with tutorial answers this question perfectly. Check out the Tutorial here with the complete code here: Mvc Music Store.
P.S. To save you searching this is the exact part you need but I would recommend reading the whole tutorial.