public ActionResult Edit(EditProfileViewModel model)
 {
     if(!Security.IsAuthenticated)
     {
         return RedirectToAction("index","home");
     }
     if(!ModelState.IsValid)
     {
         return View("index", model);
     }
     Profiles.Update(model);
     return RedirectToAction("Index");
 }
        public void Update(EditProfileViewModel model)
        {
            var profile = new UserProfile()
            {
                Id = model.Id,
                Bio = model.Bio,
                Email = model.Email,
                Name = model.Name,
                WebsiteUrl = model.Website
            };

            _profiles.Update(profile);

            _context.SaveChanges();
        }
        public ActionResult Edit(EditProfileViewModel model)
        {
            if (!Security.IsAuthenticated)
            {
                return RedirectToAction("Index", "Home");
            }

            if (!ModelState.IsValid)
            {
                return View("Index", model);
            }

            Profiles.Update(model);

            return RedirectToAction("Index");

            throw new NotImplementedException();
        }