public StartupViewModel( ILoginFactory loginFactory, IApplicationService applicationService, IDefaultValueService defaultValueService) { _loginFactory = loginFactory; _applicationService = applicationService; _defaultValueService = defaultValueService; }
public StartupViewModel( ILoginFactory loginFactory, IApplicationService applicationService, IAccountsService accountsService) { _loginFactory = loginFactory; _applicationService = applicationService; _accountsService = accountsService; }
public StartupViewModel( ILoginFactory loginFactory = null, IApplicationService applicationService = null, IAccountsService accountsService = null) { _loginFactory = loginFactory ?? GetService <ILoginFactory>(); _applicationService = applicationService ?? GetService <IApplicationService>(); _accountsService = accountsService ?? GetService <IAccountsService>(); }
public ActionResult Index(UserModel model) { if (ModelState.IsValid) { //Utilized factory pattern LoginFactory factory = new ConcreteLoginFactory(); ILoginFactory formlogin = factory.GetLogin("form"); var userDetails = formlogin.Login(model); if (userDetails.ID > 0) { // if user exists set auth values in cookie FormsAuthentication.SetAuthCookie(userDetails.UserName, false); Session["UserID"] = userDetails.ID; return(RedirectToAction("Index", "Notes")); } else { ModelState.AddModelError("", "invalid Username or Password"); } } return(View()); }
public LoginViewModel(ILoginFactory loginFactory) { _loginFactory = loginFactory; Title = "Login"; }
public LoginViewModel(ILoginFactory loginFactory) { _loginFactory = loginFactory; Title = "Login"; }
public LoginViewModel(ILoginFactory loginFactory, IFeaturesService featuresService) { _loginFactory = loginFactory; _featuresService = featuresService; }
public StartupViewModel(ILoginFactory loginFactory, IApplicationService applicationService) { _loginFactory = loginFactory; _applicationService = applicationService; }
public AccountsViewModel(IAccountsService accountsService, ILoginFactory loginFactory, IApplicationService applicationService) : base(accountsService) { _loginFactory = loginFactory; _applicationService = applicationService; }
public AddAccountViewModel(IApplicationService application, ILoginFactory loginFactory) { _application = application; _loginFactory = loginFactory; }
public AccountsViewModel(IAccountsService accountsService, ILoginFactory loginFactory, IApplicationService applicationService) : base(accountsService) { _loginFactory = loginFactory; _applicationService = applicationService; }
public AddAccountViewModel(IApplicationService application, ILoginFactory loginFactory) { _application = application; _loginFactory = loginFactory; }
public AddAccountViewModel(IApplicationService application, ILoginFactory loginFactory) { _application = application; _loginFactory = loginFactory; LoginCommand = ReactiveUI.ReactiveCommand.CreateFromTask(Login); }
public LoginViewModel(ILoginFactory loginFactory, IFeaturesService featuresService) { _loginFactory = loginFactory; _featuresService = featuresService; }