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);
}