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

Edit() public method

Edit your profile
public Edit ( ) : System.Web.Mvc.ActionResult
return System.Web.Mvc.ActionResult
        public ActionResult Edit()
        {
            var profile =
                RepositoryFactory.ProfileRepository.Queryable.SingleOrDefault(
                    x => x.User.Identifier == CurrentUser.Identity.Name);

            if (profile == null)
            {
                Message = "You don't yet have a profile, please create one now";
                return RedirectToAction("Create");
            }

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

            return View(model);
        }

Same methods

ProfileController::Edit ( Profile profile, string roles, System.Web.HttpPostedFileBase image, bool isInstructor = false ) : System.Web.Mvc.ActionResult