linq - IQueriable() to ListAsync() conversion issue due to filter on list inside a list -


i have issue filtering list inside list on async method.

private async task<list<userlist>> getasynclist(string query) {       var result = getuserlist.where(x =>             x.firstname.toupper().contains(query.toupper())                                                                                           || x.lastname.toupper().contains(query.toupper())                                                                                        || x.emailid.toupper().contains(query.toupper())                                **|| x.userrole.any(a => a.toupper().contains(query.toupper()))**);             return await result.tolistasync(); } 

getting below exception

expression of type 'system.collections.generic.iasyncenumerable1[system.string]' cannot used parameter of type 'system.collections.generic.ienumerable1[system.string]' of method 'system.collections.generic.list1[system.string] tolist[string](system.collections.generic.ienumerable1[system.string])' parameter name: arg0

kindly on this!


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

Qt QGraphicsScene is not accessable from QGraphicsView (on Qt 5.6.1) -

What is happening when Matlab is starting a "parallel pool"? -