public void Test() { var login = new LoginApp(new UserRepository(), new ModuleRepository(), new RelevanceRepository(), new BaseRepository <ModuleElement>(), new ResourceRepository(), new OrgRepository() ); var user = login.Login("admin", "admin"); foreach (var module in user.Modules) { Console.WriteLine(module.Id + "\t" + module.Name); } }
public ActionResult Index(string username, string password) { try { SessionHelper.AddSessionUser(_app.Login(username, password)); return(RedirectToAction("Index", "Home")); } catch (Exception e) { var response = new BjuiResponse { statusCode = "300", message = e.Message }; return(View(response)); } }