public int LoginUser(Login login)
        {
            SqlConnection conn = new SqlConnection(ConnectionString);
            SqlCommand cmd = new SqlCommand("Usp_LoginUser", conn);
            cmd.CommandType = CommandType.StoredProcedure;

            cmd.Parameters.Add("Email", SqlDbType.Text).Value = login.Email;
            cmd.Parameters.Add("Password", SqlDbType.Text).Value = Utility.Encrypt(login.Password);

            conn.Open();
            int resultCount = Convert.ToInt32(cmd.ExecuteScalar());
            conn.Close();

            return resultCount;
        }
 public ActionResult Login(Login login)
 {
     try
     {
         if (ModelState.IsValid)
         {
             addidasRepository = new AddidasRepository();
             int resultCount = addidasRepository.LoginUser(login);
             return View();
         }
         else
         {
             return View();
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }