public async Task UpdateSettingAsync(UpdateAgentSettingDto dto) { var agent = await Get(dto.AgentId); await Task.WhenAll(_unitOfWork.CompleteAsync(ctx => agent.UpdateSetting(new AgentSetting(dto.Version))), _cacheStore.RemoveAsync(GetCacheKey(dto.AgentId))); }
public async Task <Result> UpdateSetting([FromBody] UpdateAgentSettingDto dto) { await _agentService.UpdateSettingAsync(dto); return(Result.Success()); }