Badges.Controllers.ProfileController.Create C# (CSharp) Method

Create() public method

public Create ( ) : System.Web.Mvc.ActionResult
return System.Web.Mvc.ActionResult
        public ActionResult Create()
        {
            if (RepositoryFactory.UserRepository.Queryable.Any(x => x.Identifier == CurrentUser.Identity.Name))
            {
                Message = "You already have a profile"; //TODO: redirect to existing profile
                return RedirectToAction("Edit");
            }

            var model = new ProfileEditModel
                {
                    Profile = new Profile(),
                    Roles = RepositoryFactory.RoleRepository.Queryable.OrderByDescending(x=>x.Name).ToList()
                };

            return View(model);
        }

Same methods

ProfileController::Create ( Profile profile, string roles, System.Web.HttpPostedFileBase image ) : System.Web.Mvc.ActionResult