protected override void ReverseImplement() { if (this.Id == Guid.Empty) { return; } var cmd = new DeleteUser(this.Id); cmd.Execute(); }
protected override void RaiseImplement() { var user = UserCommon.FindById(this.Id, QueryLevel.None); if (user.IsEmpty()) { return; } //记录数据,留待恢复使用 this.Name = user.Name; this.MobileNumber = user.MobileNumber; this.AccountName = user.Account.Name; this.Password = user.Account.Password; this.RoleIds = user.Account.Roles.Select((t) => t.Id).ToArray(); this.Sex = user.Sex; var cmd = new DeleteUser(this.Id); cmd.Execute(); }