//Kullanıcı ilk kayıt olduğunda cart item oluşturmak için. public void InitializeCart(string userId) { if (string.IsNullOrEmpty(userId)) { throw new ArgumentNullException(nameof(userId)); } _cartDal.Insert(new Cart() { UserId = userId }); }
public void AddToCart(Cart cart) { _cartDal.Insert(cart); }