I think you need something like this:
var set = new List<Test>()
{
new Test(){CartItemId = 1, ProductId = 1, Extra = false},
new Test(){CartItemId = 2, ProductId = 1, Extra = true},
new Test(){CartItemId = 3, ProductId = 2, Extra = false},
new Test(){CartItemId = 4, ProductId = 2, Extra =...