public ResponseModel UpdateCategory([FromBody] Category category) { ResponseModel objResponseModel = new ResponseModel(); int statusCode = 0; string statusMessage = ""; int result = 0; try { string token = Convert.ToString(Request.Headers["X-Authorized-Token"]); Authenticate authenticate = new Authenticate(); authenticate = SecurityService.GetAuthenticateDataFromTokenCache(Cache, SecurityService.DecryptStringAES(token)); MasterCaller newMasterCategory = new MasterCaller(); category.TenantID = authenticate.TenantId; category.ModifyBy = authenticate.UserMasterID; result = newMasterCategory.UpdateCategory(new CategoryServices(Cache, Db), category); statusCode = result == 0 ? (int)EnumMaster.StatusCode.RecordNotFound : (int)EnumMaster.StatusCode.Success; statusMessage = CommonFunction.GetEnumDescription((EnumMaster.StatusCode)statusCode); objResponseModel.Status = true; objResponseModel.StatusCode = statusCode; objResponseModel.Message = statusMessage; objResponseModel.ResponseData = result; } catch (Exception) { throw; } return(objResponseModel); }