WHY I'M GETTING THIS ERROR WITH ASYNC METHOD???

SIUSSIUS PSMember

What should I do to solve this problem??

ERROR: The 'await' operator can only be used within an async method. Consider marking this method with the 'async' modifier and changing its return type to 'Task'

`
First Occurrence:

public MainViewModel ()
{
this.FabCommand = new Command (this.FabAction);
this._navigationService = DependencyService.Get<Services.INavigationService> ();
this._messageService = DependencyService.Get<Services.IMessageService> ();
await UpdateTrips (); // ERROR HERE
}

Second Occurrence:

ic_save.Clicked += (object sender, EventArgs e) => { await dvm.Save (); // ERROR HERE TOO }; `

Tagged:

Best Answers

Answers

Sign In or Register to comment.