BTW, why are you using linq to get the list? Why not just do this:
List<category> cats = cox.Categories.GetRange(0, Math.Min(10, cox.Categories));
It will throw an exception if you specify more items than what exists in the list, that's why I used
Math.Min
.