private async void BtnSell_Clicked(object sender, EventArgs e) { var vehicle = new Vehicle(); vehicle.title = EntTitle.Text; vehicle.price = Convert.ToInt32(EntPrice.Text); vehicle.engine = EntEngine.Text; vehicle.model = EntModel.Text; vehicle.color = EntColor.Text; vehicle.company = EntCompany.Text; vehicle.location = EntLocation.Text; vehicle.description = EntDescription.Text; vehicle.datePosted = DateTime.Now; vehicle.userid = Preferences.Get("userId", 0); vehicle.categoryid = categoryId; vehicle.condition = condition; var response = await ApiService.AddVehicle(vehicle); if (response == null) { return; } var vehicleId = response.vehicleId; await Navigation.PushModalAsync(new AddImagePage(vehicleId)); }