public ActionResult SignIn(SignInViewModel model) { if (ModelState.IsValid) { BusinessLayerResult <EveryNoteUser> res = everynoteuser_mngr.SignInUser(model); if (res.Errors.Count > 0) { if (res.Errors.Find(x => x.Code == ErrorMessageCode.UserIsNotActive) != null) { ViewBag.SetLink = "http://Home/Activate/12365-8925-56565"; } res.Errors.ForEach(x => ModelState.AddModelError("", x.Message)); //Tüm Errors List inde Foreach ile dön herbiri için ilgili string i (x yani) ModelState in Error üne ekle. return(View(model)); } CurrentSession.Set <EveryNoteUser>("SignIn", res.Result); // TODO : Yonlendirme yada Session a kullanıcı bilgisi atılacak return(RedirectToAction("Index")); } return(View(model)); }