private async void save(object obj) { var x = new Car() { Model = model, Color = color, ProducationDate = pdate }; var rep = new CarsRepository(App.DbPath); var a = await rep.InsertAsync(x); Cars = new ObservableCollection <Car>(await rep.GetAllAsync()); }
private async void savecarAsync() { UserDialogs.Instance.ShowLoading(); var car = new Car() { Color = color, Model = model, ProducationDate = pdate }; var CarRepo = new CarsRepository(App.DbPath); var res = await CarRepo.InsertAsync(car); UserDialogs.Instance.HideLoading(); }