GetMulti call on EntityCollection

Posts   
 
    
e106199
User
Posts: 175
Joined: 09-Sep-2006
# Posted on: 03-Oct-2012 17:26:39   

Hi, i have an entity collection and i am trying to filter it further to reach an entity. so i tried using entity collections getmulti method but for some reason it returns bool.

am i missing something here? isnt it supposed to return a collection?

in definition it says "retrieves in this Collection object all Entity objects which match ..."

thanks -shane

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 03-Oct-2012 20:06:48   

Do you have an entity collection that you want to filter it in-memory? Or you need to filter on the database side?

e106199
User
Posts: 175
Joined: 09-Sep-2006
# Posted on: 03-Oct-2012 20:15:59   

I already have the collection in memory.

Walaa wrote:

Do you have an entity collection that you want to filter it in-memory? Or you need to filter on the database side?

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 04-Oct-2012 05:25:30   

You can either use Linq or EntityView

e106199
User
Posts: 175
Joined: 09-Sep-2006
# Posted on: 04-Oct-2012 06:01:19   

Thank you, i used entityview.

so does it mean i can't call getmulti on an entity collection that is already in memory?

and is it normal that getmulti would turn a bool even if the description says it returns a collection?

thanks -shane

Walaa wrote:

You can either use Linq or EntityView

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 04-Oct-2012 06:47:15   

GetMulti() goes to the database, to fill the passed in entityCollection, with entities fetched from the database.