I am using wcf to perform the task of insert the data. I am using one of wcf void function to insert the user data
AceVqbzServiceClient aceVqbzClientService = new AceVqbzServiceClient();
aceVqbzClientService.OpenAsync();
IAceVqbzService aceVqbzTypeService = aceVqbzClientService as IAceVqbzService;
Task.Factory.FromAsync(
aceVqbzTypeService.BeginSaveUserOrganizationLinking,
aceVqbzTypeService.EndSaveUserOrganizationLinking,
objUser_OrganizationDetail,
TaskCreationOptions.None);
aceVqbzClientService.CloseAsync();
this is the function
Function is not giving any issue when i am using but data is not inserting through this. Please give me solution so that i can implement this
You need the asynchronously wait (with await) the Task returned from FromAsync:
public async Task FooAsync()
{
AceVqbzServiceClient aceVqbzClientService = new AceVqbzServiceClient();
await aceVqbzClientService.OpenAsync();
IAceVqbzService aceVqbzTypeService = aceVqbzClientService as IAceVqbzService;
await Task.Factory.FromAsync(
aceVqbzTypeService.BeginSaveUserOrganizationLinking,
aceVqbzTypeService.EndSaveUserOrganizationLinking,
objUser_OrganizationDetail, TaskCreationOptions.None);
await aceVqbzClientService.CloseAsync();
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With