New Posts New Posts RSS Feed: what is wrong with my ExecuteQueryAsync?
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

what is wrong with my ExecuteQueryAsync?

 Post Reply Post Reply
Author
BillG View Drop Down
DevForce MVP
DevForce MVP
Avatar

Joined: 05-Dec-2007
Location: Monroe, MI
Posts: 233
Post Options Post Options   Quote BillG Quote  Post ReplyReply Direct Link To This Post Topic: what is wrong with my ExecuteQueryAsync?
    Posted: 14-Sep-2010 at 9:23pm

 
public void FetchMembers(MemberQO q)
{
....
 
var query = PredicateBuilder.FilterQuery(entityManager.Members, aCompositePredicateDescription);

int token = 1;

entityManager.ExecuteQueryAsync((IEntityQuery)query, MembersQueryCompletedCallback, token);

}

Error 3 The best overloaded method match for 'IdeaBlade.EntityModel.EntityManager.ExecuteQueryAsync(IdeaBlade.EntityModel.IEntityQuery, System.Action<IdeaBlade.EntityModel.EntityQueryOperation>, object)' has some invalid arguments C:\Software Development\VS2010\LaborWareSL\LaborWareSL\ViewModels\MemberListViewModel.cs 65 13 LaborWareSL

Error 4 Argument 2: cannot convert from 'method group' to 'System.Action<IdeaBlade.EntityModel.EntityQueryOperation>' C:\Software Development\VS2010\LaborWareSL\LaborWareSL\ViewModels\MemberListViewModel.cs 65 66 LaborWareSL

private void MembersQueryCompletedCallback(EntityQueryOperation<Member> args)

{

var results = args.Results;

results.ForEach(Members.Add);

}

Back to Top
BillG View Drop Down
DevForce MVP
DevForce MVP
Avatar

Joined: 05-Dec-2007
Location: Monroe, MI
Posts: 233
Post Options Post Options   Quote BillG Quote  Post ReplyReply Direct Link To This Post Posted: 15-Sep-2010 at 1:05pm
I figured it out. It should be as follows
 

entityManager.ExecuteQueryAsync<Member>((IdeaBlade.EntityModel.IEntityQuery<Member>)query, MembersQueryCompletedCallback, token);

Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down