public IHttpActionResult AttachAction(int id, [FromBody] EventInActionModels.Edit EventInAction)
        {
            JavaScriptSerializer js = new JavaScriptSerializer();
            string logForm          = "Form : " + js.Serialize(EventInAction);
            string logAPI           = "[Put] " + Request.RequestUri.ToString();

            if (!ModelState.IsValid)
            {
                Global._appLogger.Warn(logAPI + " || Input Parameter not expected || " + logForm);
                return(BadRequest("Invalid data"));
            }

            try
            {
                EventInActionModels EventRuleCatalogModel = new EventInActionModels();
                EventRuleCatalogModel.AttachApplication(id, EventInAction);
                return(Ok("Success"));
            }
            catch (Exception ex)
            {
                StringBuilder logMessage = LogHelper.BuildExceptionMessage(ex);
                logMessage.AppendLine(logForm);
                Global._appLogger.Error(logAPI + logMessage);

                return(Content(HttpStatusCode.InternalServerError, ex));
            }
        }
        public IHttpActionResult GetAllAction(int id)
        {
            EventInActionModels alarmNotificationModel = new EventInActionModels();

            return(Ok(alarmNotificationModel.GetAllApplicationByEventRuleCatalogId(id)));
        }