Example #1
0
        public ActionResult Create()
        {
            if (User != null)
            {
                user = _usersRepo.GetById(User.Identity.GetUserId());
            }

            Url    url    = new Url();
            string random = Helpers.GenerateRandomgUrl();

            while (_repo.Exists(random))
            {
                random = Helpers.GenerateRandomgUrl();
            }
            ViewBag.RandomUrl = random;
            return(View(url));
        }