public ActionResult Index() { var customers = _customerService.GetAllCustomers(); var testcustomer = new Customer() { Actived = true, Avtar = "14324254", Baned = false, Email = "shepherds@[email protected]", Phone = "111111111111111111111111111111111" }; _customerService.InsertCustomer(testcustomer); return View(customers); }
/// <summary> /// 注销 /// </summary> public virtual void SignOut() { _customer = GetAuthenticatedCustomer(); FormsAuthentication.SignOut(); }
/// <summary> /// 身份认证登录 /// </summary> /// <param name="customer"></param> /// <param name="rememberPassword"></param> public virtual void SignIn(Customer customer, bool rememberPassword) { FormsAuthentication.SetAuthCookie(customer.Username,rememberPassword); _customer = GetAuthenticatedCustomer(); //if() }