public IHttpActionResult Create([FromBody] CreateApprovalProcDto ApprovalProc)
 {
     if (ApprovalProc == null)
     {
         return(BadRequest());
     }
     if (!ModelState.IsValid)
     {
         string errorMessage = new ModelStateError(_logger).OutputMessage(ModelState);
         return(BadRequest(errorMessage));
     }
     try
     {
         _ApprovalProcService.Create(ApprovalProc);
     }
     catch (LogicalException ex)
     {
         return(BadRequest(ex.Message));
     }
     catch
     {
         return(BadRequest(AppSettings.INTERNAL_SERVER_ERROR_MESSAGE));
     }
     return(Ok());
 }
        public void Create(CreateApprovalProcDto dto)
        {
            var approvalProc = new ApprovalProc
            {
                Title            = dto.Title,
                ParentId         = dto.ParentId,
                FirstPriorityId  = dto.FirstPriorityId,
                SecondPriorityId = dto.SecondPriorityId,
                ThirdPriorityId  = dto.ThirdPriorityId,
                ActiveState      = dto.ActiveState
            };

            _approvalProcRepository.Insert(approvalProc);
        }