iSeller Commerce
iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Crosslight
WebUI
ClientUI
What's New
Download Trial
Web Solution
Mobile Solution
Enterprise Solution
Custom Development
Blog
Community
Latest Development Blogs
ForumPostTopic
Browse By Tag
Intersoft WebApi Controllers support sync methods, but I cannot find a way to use them in async mode. As you know, the async methods are supported by the latest version of WebApi 2, it can increase performance significantly. Please take a look.
Maybe the code can be generated as below:
[HttpGet]public async Task<QueryResult> Categories(ODataQueryOptions<Category> options) { return await this.ToQueryResultAsync<Category>(db.Context.Categories, options); }
I assume that you are using Business project template of Crosslight. To use async mode, you can modify OnNavigated in CategoryListViewModel into the following snippet code:
public override async void Navigated(NavigatedParameter parameter) { base.Navigated(parameter); ISelectResult<Category> selectResult = await this.Repository.GetAllAsync(); this.Items = selectResult.Items.ToObservable(); }
Hope this helps.
Thank you for your explaination.
But I mean server side async methods in Controller generated by Crosslight VS Extension. Does it support async mode?
Currently, the generated code of Web API controller doesn't use async mode. I have forwarded this to Crosslight development team as feature request. It is submitted under CROS-678.
Once implemented, there are no code changes needed in your existing Crosslight mobile project.
I will keep this thread updated with any news I heard from the team regarding CROS-678.
or
Choose this if you're already a member of Intersoft Community Forum. You can link your OpenID account to your existing Intersoft Social ID.
Choose this if you don't have an Intersoft account yet. Your authenticated OpenID will be automatically linked to your new Intersoft account.
Enter your Wordpress Blogname