public async void Init() { var request = new SqlessSelectRequest() { AccessParams = new string[] { WpfGlobal.LoginUser.Uid, WpfGlobal.LoginUser.Password }, Table = Tables.Order }; request.LoadFromType(typeof(Order)); try { var orders = await SqlessClient.Select <Order>(request); foreach (var order in orders) { Orders.Add(order); } } catch (SqlessRequestException ex) { MessageBox.Show(ex.Message); } }
public async void Init() { var request = new SqlessSelectRequest() { AccessParams = new string[] { User.Uid, User.Password }, Table = Tables.Product }; request.LoadFromType(typeof(Product)); try { var products = await SqlessClient.Select <Product>(request); foreach (var product in products) { Products.Add(product); } } catch (SqlessRequestException ex) { MessageBox.Show(ex.Message); } }