public ResponseModel CreateSLA([FromBody] SLAModel insertSLA) { int insertCount = 0; ResponseModel objResponseModel = new ResponseModel(); int statusCode = 0; string statusMessage = ""; try { ////Get token (Double encrypted) and get the tenant id string token = Convert.ToString(Request.Headers["X-Authorized-Token"]); Authenticate authenticate = new Authenticate(); authenticate = SecurityService.GetAuthenticateDataFromTokenCache(Cache, SecurityService.DecryptStringAES(token)); SettingsCaller newSLA = new SettingsCaller(); insertSLA.TenantID = authenticate.TenantId; insertSLA.CreatedBy = authenticate.UserMasterID; insertCount = newSLA.InsertSLA(new SLAServices(Cache, Db), insertSLA); statusCode = insertCount == 0 ? (int)EnumMaster.StatusCode.RecordAlreadyExists : (int)EnumMaster.StatusCode.Success; statusMessage = CommonFunction.GetEnumDescription((EnumMaster.StatusCode)statusCode); objResponseModel.Status = true; objResponseModel.StatusCode = statusCode; objResponseModel.Message = statusMessage; objResponseModel.ResponseData = insertCount; } catch (Exception) { throw; } return(objResponseModel); }