NullReferenceException
when it gets to this line:
var stringId = context.Session.GetString("cart");
public class Uno { private readonly HttpContext context; public Uno() { } public Uno(HttpContext _context) { context = _context; } public string GetCartId() { string cartId = ""; var stringId = context.Session.GetString("cart"); if(stringId == null) { cartId = Guid.NewGuid().ToString(); stringId = cartId; } else if(stringId != null) { cartId = stringId; } return cartId; } }