public ManagerExecution( IServiceProvider services) : this() { _services = services; actionSchudeleDAO = services.GetRequiredService <ActionSchudeleDAO>(); actionsDAO = services.GetRequiredService <SagaActionsDAO>(); stateDAO = services.GetRequiredService <StateDAO>(); actionLogStateDAO = services.GetRequiredService <ActionLogStateDAO>(); }
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); }
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); }
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); }