I have tried for several hours to get the examples in the help file for the AsyncSerialTask to work in a unit test. It does not work.
Here is my code. It is take directly from the help file with some minor modification for my database objects
CypressEntityManager mgr = CypressEntityManager.DefaultManager;
var rootTask = AsyncSerialTask.Create<string>("Task1");
rootTask
.AddAsyncQuery((code) => mgr.Suffixes.Where(s => s.Code == code))
.AddAsyncQuery( (args) => args.Result.First())
.Execute("Jr", asyncSerCompletedHandler);
}
Here is the first error I get.
Error 203 The type arguments for method 'IdeaBlade.EntityModel.AsyncSerialTaskExtensions.AddAsyncQuery<T0,T1,T2>(IdeaBlade.EntityModel.AsyncSerialTask<T0,T1>, System.Func<T1,IdeaBlade.EntityModel.IEntityQuery<T2>>)' cannot be inferred from the usage. Try specifying the type arguments explicitly.
The error is in reference to the first AddAsyncQuery line. I have tried many different forms of this code and cannot get it working at all. Unless someone can show me how to do this simple thing I can't see using this as much as I would like to.
We need a lot more examples of this type of advanced object in the help or sample applications that use these types of calls in various configurations.