public async Task <ActionResult <CalculatedElementData> > AddCostAttribute([FromBody] CalculatedElementData calculatedElementData) { var keyValue = $"CalculatedElementData:CostingVersionId:{calculatedElementData.BidId}"; var result = await _redisService.Set(keyValue, calculatedElementData); Log.Information($"Add user: {result}"); return(Ok()); }
public async Task <ActionResult <CalculatedElementData> > AddCostAttribute([FromBody] CalculatedElementData calculatedElementData) { const string logMessage = "Add costattribute, "; var keyValue = $"CalculatedElementData:CostingVersionId:{calculatedElementData.BidId}"; try { Log.Information($"{logMessage}begin"); var result = await _redisService.Set(keyValue, calculatedElementData); Log.Information($"{logMessage}end"); return(Ok(result)); } catch (Exception ex) { Log.Error($"{logMessage}error, {ex.Message}"); return(BadRequest()); } }