async Task<List<Vessel>> getVesselsAsyn() { var db = new VesselDatabase(); return await Task.Run(() => db.getAllVessel()); }
private async void getAllVesselAsyn() { var db = new VesselDatabase(); var list = await Task.FromResult<List<Vessel>>(db.getAllVessel()); lvVessels.ItemsSource = list; }