public EditProfileInput(Profile profile) { Username = profile.Username; FirstName = profile.FirstName; LastName = profile.LastName; Email = profile.Email; }
public virtual ViewResult Show(string username) { var profile = _profileRepository.Find(username); if (profile == null) { profile = new Profile(username); _profileRepository.Add(profile); } return View(profile); }
public ViewResult Show(string username) { var profile = _profileRepository.Find(username); if (profile == null) { profile = new Profile(username); _profileRepository.Add(profile); } bool hasPermission = User.Identity.Name == username; ViewData["hasPermission"] = hasPermission; return View(profile); }
public void Add(Profile profile) { _profiles.Add(profile); }