Reputation: 3
var parentstl = from parentstyle in DBB.vParentStyles
select new { parentstyle.name,
parentstyle.description,
parentstyle.price,
parentstyle.categories
};
I want parentstyle.categories
to convert into int[]
array.
How can I do that?
Upvotes: 0
Views: 76
Reputation: 726987
You can use Select
to make projections, like this:
var parentstl = from parentstyle in DBB.vParentStyles
select new {
parentstyle.name,
parentstyle.description,
parentstyle.price,
Categories = parentstyle.categories.ToArray()
};
Upvotes: 2