//public ActionResult Login(User user){ // UserServiceClient service = new UserServiceClient(); // User userSign = new User(); // //Arrumar no webservice !!! // userSign = service.findByEmailAndPassword(user); // //userSign = service.find(user); // //service.signIn(userSign); // return View("_RegisterUser"); //} public ActionResult SignIn(User user) { UserServiceClient service = new UserServiceClient(); try{ Session["currentUser"] = service.signIn(user); }catch(Exception ex) { throw new FaultException("Usuario ou senha invalido |" +ex); } return RedirectToAction("Index","Post"); }
//public ActionResult Login(User user){ // UserServiceClient service = new UserServiceClient(); // User userSign = new User(); // //Arrumar no webservice !!! // userSign = service.findByEmailAndPassword(user); // //userSign = service.find(user); // //service.signIn(userSign); // return View("_RegisterUser"); //} public ActionResult SignIn(User user) { UserServiceClient service = new UserServiceClient(); service.signIn(user); return View("_Login"); }