what is wrong with my ExecuteQueryAsync?
Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce 2010
Forum Discription: For .NET 4.0
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=2157
Printed Date: 10-Jun-2026 at 8:53pm
Topic: what is wrong with my ExecuteQueryAsync?
Posted By: BillG
Subject: what is wrong with my ExecuteQueryAsync?
Date 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);
}
|
Replies:
Posted By: BillG
Date 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);
|
|