public ActionResult Credit(Guid? id) { if (id.IsNull()) return View(new HotLine { Position = _iService.GetPosition() }); var result = _iService.GetEntityById(id.GetValueOrDefault()); return View(result); }
/// <summary> /// Updates the password for the user. /// </summary> /// <param name="userId">The user identifier.</param> /// <param name="password">The password.</param> /// <returns></returns> public IdentityResult UpdatePassword(Guid userId, string password) { if (userId.IsNull() || userId.IsNew()) return null; try { return _userManager.AddPassword(userId, password); } catch (Exception ex) { _traceSource.Error(ex.Message); _traceSource.Error(_context.GetValidationErrors()); throw; } }