async Task <bool> _PutCommonOptions(string id, CodeGenCommonOptionsModel value) { var key = CodeGenControllerKeys.CommonOptions + id; var cacheResult = JsonConvert.SerializeObject(value); var result = await redis.SetAsync(key, cacheResult, null); return(result); }
public async Task <ApiResult <bool> > PutCommonOptions(string id, [FromBody] CodeGenCommonOptionsModel value) { if (!ModelState.IsValid) { return(new ApiResult <bool>(l, BasicControllerEnums.UnprocessableEntity, ModelErrors())); } var result = await _PutCommonOptions(id, value); return(new ApiResult <bool>(result)); }