Esempio n. 1
0
    public EmployeeGroup(AppApiGroup source)
        : base(source)
    {
        var actions = new WebAppApiActionFactory(source);

        Index       = source.AddAction(actions.DefaultView());
        AddEmployee = source.AddAction
                      (
            actions.Action
            (
                nameof(AddEmployee),
                () => new AddEmployeeValidation(),
                () => new AddEmployeeAction()
            )
                      );
        AddEmployeeFormView = source.AddAction
                              (
            actions.PartialView
            (
                nameof(AddEmployeeFormView),
                () => new AddEmployeeFormViewAction()
            )
                              );
        AddEmployeeForm = source.AddAction
                          (
            actions.Action
            (
                nameof(AddEmployeeForm),
                () => new AddEmployeeFormAction()
            )
                          );
        Employee = source.AddAction
                   (
            actions.Action
            (
                nameof(Employee),
                () => new EmployeeAction(),
                "Get Employee Information"
            )
                   );
    }
Esempio n. 2
0
        public AuthGroup(AppApiGroup source, AuthActionFactory actionFactory)
            : base(source)
        {
            var actions = new WebAppApiActionFactory(source);

            Index       = source.AddAction(actions.DefaultView());
            VerifyLogin = source.AddAction
                          (
                actions.Action
                (
                    nameof(VerifyLogin),
                    actionFactory.CreateVerifyLoginAction
                )
                          );
            VerifyLoginForm = source.AddAction
                              (
                actions.PartialView
                (
                    nameof(VerifyLoginForm),
                    () => new PartialViewAppAction <EmptyRequest>(nameof(VerifyLoginForm))
                )
                              );
            Login = source.AddAction
                    (
                actions.Action
                (
                    nameof(Login),
                    () => new LoginModelValidation(),
                    actionFactory.CreateLoginAction
                )
                    );
            Logout = source.AddAction
                     (
                actions.Action
                (
                    nameof(Logout),
                    actionFactory.CreateLogoutAction
                )
                     );
        }