Fluent->Anon Type
Is it possible in the Fluent interface to define a custom type?
This is what I normally do, but I'm wondering if it can be done inline without needing to manipulate the collection a second time
Hi Steve,
Can you please clarify the question? I think that I am not able to understand fully what you want to achieve.
Kind regards,
Radoslav Georgiev
the Telerik team
Something like
var (dyanmic?) person = App.WorkWith(). .... .Get() .Select(x => new Name = x.FullName, Address = x.Address );Hi Steve,
I think that we already support this. Isn't the below what you want to do:
var newsQuery = from nI in App.WorkWith().NewsItems().Get() where nI.Status == Telerik.Sitefinity.GenericContent.Model.ContentLifecycleStatus.Live select new Title = nI.GetString("Title") ;Yeah okay so I guess it was more of a Linq question really...
So the from <x> in <y> syntax is the only way to do it
Thanks! :)
Hi Steve,
Well, no. What ever is supported on IQuerieable, see sample below:
var newsQuery = App.WorkWith() .NewsItems() .Where(nI=> nI.Status == Telerik.Sitefinity.GenericContent.Model.ContentLifecycleStatus.Live).Get() .Select(nI => new Title = nI.GetString("Title"), nI.Id);THAT was the syntax I was looking for thanks much!