/// <inheritdoc /> public virtual TViewModel UpdateRow <TViewModel>(string connectorName, string tableName, TViewModel value, ILoggingService loggingService = null) where TViewModel : class { IOperationResource resource = ResourceFactory.GetResource(connectorName, OperationType.write, tableName); object[] id = null; try { id = resource.GetPrimaryKeys(value); } catch (Exception) { throw; } finally { //Log even if values for PK not found loggingService?.AddTableToLogger(connectorName, tableName, HttpMethodType.PUT, id); } return(resource.UpdateResourceRecordById(value, id)); }
/// <inheritdoc /> public virtual object UpdateRow(string connectorName, string tableName, JToken value, ILoggingService loggingService = null) { Check.NotNull(value, nameof(value)); IOperationResource resource = ResourceFactory.GetResource(connectorName, OperationType.write, tableName); object[] id = null; try { id = resource.GetPrimaryKeys(value); } catch (Exception) { throw; } finally { //Log even if values for PK not found loggingService?.AddTableToLogger(connectorName, tableName, HttpMethodType.PUT, id); } return(resource.UpdateResourceRecordById(value, id)); }