public ActionResult Login(User user)
        {
            if (_bUser.ExistUser(user.UserName, user.Password))
            {
                Session["LoginObject"] = _bUser.GetUser(user.UserName, user.Password);
                return RedirectToAction("Index", "Management");

            }
            ViewBag.ErrorModel = "";
            return View();
        }
 public ActionResult CreateUser(User user)
 {
     if (_bUser.AddUser(user))
     {
         return RedirectToAction("UserList", "Management");
     }
     else
     {
         ViewBag.Error = "Kullanıcı Eklenemedi Lütfen Tekar Deneyiniz";
         return View();
     }
 }
 public User GetUser(User user)
 {
     return GetUser(user.Id);
 }
 public bool AddUser(User user)
 {
     user.Password = Sm.MD5Encryption(user.Password);
     return (db.Add(user) > 0);
 }