private void btnSave_Click(object sender, RoutedEventArgs e) { Make maker; maker = new Make() { Name = txtFabricante.Text }; if (_editing == null) maker.Id = Database.GetInstance.redisClient.As<Make>().GetNextSequence(); else maker.Id = _editing.Id; if (maker.Validate()) { using (var trans = Database.GetInstance.redisClient.CreateTransaction()) { trans.QueueCommand(r => r.Store<Make>(maker)); trans.Commit(); } ListaFabricantes(); LimpaCampos(); } }
private void btnSave_Click(object sender, RoutedEventArgs e) { var maker = new Make() { Id = Database.GetInstance.redisClient.As<Make>().GetNextSequence(), Name = txtFabricante.Text }; using (var trans = Database.GetInstance.redisClient.CreateTransaction()) { trans.QueueCommand(r => r.Store<Make>(maker)); trans.Commit(); } }