Nest returning results as IReadOnlyCollection, how to change it so it is usable?

Using elasticsearch, I'm trying to add my hit results into a list after they are returned, like this:

var lstModels = new SearchResult<mdl.Event>();

var searchResponse = Event.client.Search<mdl.Event>(s => s
                    .Query(q => q
                        .QueryString(qs => qs
                        && q
                        .DateRange(r => r
                            .Field(f => f.CreatedTimeStamp)

However I am getting an error saying that my types are incompatible.

cannot convert from 'System.Collections.Generic.IReadOnlyCollection<Nest.IHit<Event>>' to 'System.Collections.Generic.IEnumerable<Event>'

Why are my hits returning as part of the Read Only Collection? Is there a way to change this so that they are usable?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.