Im trying to do this….
var entity = landingPages.Select(x = new MyClass { name = x.name, age = x.age });
The only problem is that age is actually a coolection so I thought I would do this…
var entity = landingPages.Select(x = new MyClass { name = x.name, age.add(x.age) });
But it dont work. Is this possible?
You didn’t say which age was a collection (LandingPage’s age or MyClass’ age).
If it’s the LandingPage’s age, then: convert the single value into a collection.
If it’s MyClass’ age, then: convert the collection to a single value.