/// <summary> /// 保存需要重置用户 /// </summary> /// <returns></returns> public static bool Save(ResetUser user) { if (user.Id == string.Empty) { user.Id = null; } user.ResetTime = DateTime.Now; return(DbContextManager.Create <ResetUser>().Save(user)); }
/// <summary> /// 忘记密码调用 /// </summary> /// <param name="user"></param> public static bool ForgotPassword(ResetUser user) { var ret = DbContextManager.Create <User>().ForgotPassword(user); if (ret) { CacheCleanUtility.ClearCache(cacheKey: RetrieveUsersDataKey); } return(ret); }
/// <summary> /// /// </summary> /// <param name="user"></param> /// <returns></returns> public virtual bool ForgotPassword(ResetUser user) => ResetUserHelper.Save(user);
/// <summary> /// 保存需要重置用户 /// </summary> /// <returns></returns> public static bool Save(ResetUser user) { user.ResetTime = DateTime.Now; return(DbContextManager.Create <ResetUser>()?.Save(user) ?? false); }
/// <summary> /// /// </summary> /// <returns></returns> public virtual bool Save(ResetUser user) { using var db = DbManager.Create(); db.Save(user); return(true); }
/// <summary> /// /// </summary> /// <returns></returns> public virtual bool Save(ResetUser user) { DbManager.Create().Save(user); return(true); }