public async Task <WorkflowActionGetRes> GetWorkflowAction(WorkflowActionGetReq request) { var response = new WorkflowActionGetRes(); try { response.WorkflowActions = _MongoContext.Workflow_Actions.AsQueryable().Where(x => x.ModuleParent == request.ModuleParent && x.Module == request.Module && x.Action == request.Action).ToList(); response.ResponseStatus.Status = "Success"; } catch (Exception e) { response.ResponseStatus.ErrorMessage = e.Message; response.ResponseStatus.Status = "Error"; } return(response); }
public async Task <WorkflowActionGetRes> GetWorkflowAction([FromBody] WorkflowActionGetReq request) { var response = new WorkflowActionGetRes(); try { if (request != null) { response = await _MasterRepository.GetWorkflowAction(request); } else { response.ResponseStatus.Status = "Failure"; response.ResponseStatus.ErrorMessage = "request can not be Null/Empty."; } } catch (Exception ex) { response.ResponseStatus.Status = "Failure"; response.ResponseStatus.ErrorMessage = "An Error Occurs " + ex.Message; } return(response); }