private static void AppendUpdateCommand(Script script, UpdateCommand command, ref int paramIndex) { if (ReverseUpdateHelper.IsReverseUpdateWithChildReferencingParent(command.Operations.First())) { AppendReverseUpdateCommandForChildTableReferencingParent(script, command, ref paramIndex); } else { AppendStandardUpdateCommand(script, command, ref paramIndex); } }
private DtoMetadata GetNewUpdateMetadata(UpdateOperation update) { return(ReverseUpdateHelper.IsReverseUpdateWithChildReferencingParent(update) ? update.ValueMetadata : update.OwnerMetadata); }
private string GetNewUpdateTableName(UpdateOperation update) { return(ReverseUpdateHelper.IsReverseUpdateWithChildReferencingParent(update) ? update.ValueMetadata.TableName : update.TableName); }
private object GetNewUpdatePrimaryKeyValue(UpdateOperation update) { return(ReverseUpdateHelper.IsReverseUpdateWithChildReferencingParent(update) ? update.ValueMetadata.GetPrimaryKeyValueAsObject(update.Value) : update.OwnerPrimaryKeyAsObject); }