Ejemplo n.º 1
0
        public IRoute Submit(ILoginService service, RequestViewModel request)
        {
            var success = service.Login(request.UserName, request.Password);

            if (success)
                return new Route("success", "login");

            return new Route("failure", "login")
                .AddError("login failed");
        }
Ejemplo n.º 2
0
        public override IRoute GetRoute()
        {
            var requestViewModel = new RequestViewModel();
            requestViewModel.UserName = "******";
            requestViewModel.Password = "******";

            var route = "submit login".ToRoute();
            route.Parameters.Add("request", requestViewModel);
            route.Parameters.Add(KnownParameters.ParentShowAs, "window");
            route.Parameters.Add(KnownParameters.ParentView, new RequestView());

            return route;
        }