public ActionResult otherProfile(string id,EditViewModel model)
 {
     ViewBag.userId = id;
     return View(model);
 }
        public async Task<ActionResult> Edit(EditViewModel model)
        {
            if (ModelState.IsValid)
            {
                var store = new UserStore<ApplicationUser>(new ApplicationDbContext());
                var manager = new UserManager<ApplicationUser>(store);
                // Get the current application user
                var user = UserManager.FindById(User.Identity.GetUserId());;

                // Update the details
                user.FirstName = model.FirstName;
                user.LastName = model.LastName;
                user.EMail = model.EMail;
                user.City = model.City;
                user.Age = model.Age;

                // This is the part that doesn't work
                var result = await manager.UpdateAsync(user);
                var ctx = store.Context;
                ctx.SaveChanges();
                // However, it always succeeds inspite of not updating the database
                if (!result.Succeeded)
                {
                    AddErrors(result);
                }
            }

            return RedirectToAction("Manage");
        }