public void RegisterUpdate(string tenantIdOverride, UpdateStyle updateStyle, UpdateBatch batch, object entity, string json) { var newVersion = CombGuidIdGeneration.NewGuid(); var currentVersion = batch.Versions.Version <T>(Identity(entity)); ICallback callback = null; IExceptionTransform exceptionTransform = null; var sprocName = determineDbObjectName(updateStyle, batch); var tenantId = tenantIdOverride ?? batch.TenantId; if (_mapping.UseOptimisticConcurrency && batch.Concurrency == ConcurrencyChecks.Enabled) { callback = new OptimisticConcurrencyCallback <T>(Identity(entity), batch.Versions, newVersion, currentVersion); } if (!_mapping.UseOptimisticConcurrency && updateStyle == UpdateStyle.Update) { callback = new UpdateDocumentCallback <T>(Identity(entity)); } if (updateStyle == UpdateStyle.Insert) { exceptionTransform = new InsertExceptionTransform <T>(Identity(entity), _mapping.Table.Name); } var call = batch.Sproc(sprocName, callback, exceptionTransform); _sprocWriter(call, (T)entity, batch, _mapping, currentVersion, newVersion, tenantId); }
private void image2_MouseDown(object sender, MouseButtonEventArgs e) { backgroundImageName.SaveStyleName("Image4Style"); styleName.SaveStyleName("Без стилю"); styleBox.SelectedItem = styleName.GetStyleName(); UpdateStyle.SetThemes("Image4Style"); }
public static void ThemeChange() { string style = styleName.GetStyleName(); if (style != "Без стилю") { UpdateStyle.SetThemes(style); } else { style = backgroundImageName.GetStyleName(); UpdateStyle.SetThemes(style); } }
private DbObjectName determineDbObjectName(UpdateStyle updateStyle, UpdateBatch batch) { switch (updateStyle) { case UpdateStyle.Upsert: if (_mapping.UseOptimisticConcurrency && batch.Concurrency == ConcurrencyChecks.Disabled) { return(_mapping.OverwriteFunction); } return(_mapping.UpsertFunction); case UpdateStyle.Insert: return(_mapping.InsertFunction); case UpdateStyle.Update: return(_mapping.UpdateFunction); default: throw new ArgumentOutOfRangeException(); } }
public void RegisterUpdate(string tenantIdOverride, UpdateStyle updateStyle, UpdateBatch batch, object entity, string json) { throw new NotImplementedException(); }
public void RegisterUpdate(string tenantIdOverride, UpdateStyle updateStyle, UpdateBatch batch, object entity) { var json = batch.Serializer.ToJson(entity); RegisterUpdate(tenantIdOverride, updateStyle, batch, entity, json); }
protected DocumentStorageOperation(UpdateStyle updateStyle, object document) { Document = document ?? throw new ArgumentNullException(nameof(document)); UpdateStyle = updateStyle; }
public void RegisterUpdate(string tenantIdOverride, UpdateStyle updateStyle, UpdateBatch batch, object entity, string json) { _parent.RegisterUpdate(tenantIdOverride, updateStyle, batch, entity, json); }
private void MainWindow_Loaded(object sender, RoutedEventArgs e) { LoadView(ViewType.ShooseThems); UpdateStyle.SetThemes("Dark");//0003B FFD0B 85B84F }