Beispiel #1
0
 public ManagerExecution(
     IServiceProvider services)
     : this()
 {
     _services         = services;
     actionSchudeleDAO = services.GetRequiredService <ActionSchudeleDAO>();
     actionsDAO        = services.GetRequiredService <SagaActionsDAO>();
     stateDAO          = services.GetRequiredService <StateDAO>();
     actionLogStateDAO = services.GetRequiredService <ActionLogStateDAO>();
 }
Beispiel #2
0
        public Result <List <State> > getAllStates()
        {
            Result <List <State> > result = new Result <List <State> >();

            try
            {
                StateDAO dao = new StateDAO();
                result.Data   = dao.GetAllStates();
                result.Status = ResultEnum.Success;
            }
            catch (Exception)
            {
                result.Status = ResultEnum.Fail;
            }
            return(result);
        }
Beispiel #3
0
        public ResultEnum InsertState(State state)
        {
            ResultEnum result = ResultEnum.Success;

            try
            {
                StateDAO dao = new StateDAO();
                dao.InsertState(state);
                result = ResultEnum.Fail;
            }
            catch
            {
                result = ResultEnum.Fail;
            }
            return(result);
        }
Beispiel #4
0
        public async Task <Result <List <State> > > getAllStatesListASYNC()
        {
            Result <List <State> > result = new Result <List <State> >();

            try
            {
                StateDAO dao = new StateDAO();
                result.Data = await dao.GetAllStatesListASYNC();

                result.Status = ResultEnum.Success;
            }
            catch (Exception)
            {
                result.Status = ResultEnum.Fail;
            }
            return(result);
        }