public void UpdateRowCount(TableUpdateDto table) { TableDto clientTable = GetTable(table); if (clientTable == null) { clientTable = new TableDto { MapId = table.Id, Name = $"Unknown Table[{table.Id}]", UnknownTable = true, RowCount = table.RowCount }; Tables.Add(clientTable); } clientTable.RowCount = table.RowCount; }
public IActionResult UpdateTable(string id, TableUpdateDto table) { try { Table t = _mapper.Map <Table>(table); t.Id = id; //TODO: asign role, Email, Password, AccountType from client or do partial update with Attach if (_tablesService.UpdateTable(t)) { return(Ok()); } return(NotFound("Table with id not found")); } catch (Exception ex) { return(StatusCode(StatusCodes.Status500InternalServerError, ex.Message)); } }
public void UpdateRowCount(TableUpdateDto table) { IMachine client = Context.GetClientByContext <IMachine>(); client.UpdateRowCount(table); }