protected override DTObject DynamicInvoke(dynamic arg) { var cmd = new UserSubsystem.UpdateUser(arg.Id) { Name = arg.Name, PhotoId = arg.PhotoId ?? arg.Photo?.Id ?? Guid.Empty, Email = arg.Email, MobileNumber = arg.MobileNumber }; if (arg.Sex != null) { cmd.Sex = (Sex)arg.GetValue <byte>("sex"); } cmd.Execute(); return(DTObject.Empty); }
protected override void RaiseImplement() { { var cmd = new UpdateUser(this.Id) { Name = this.Name, }; if (this.Sex != null) { cmd.Sex = (Sex)this.Sex.Value; } cmd.Execute(); } { var cmd = new UpdateAccount(this.Id) { Name = this.AccountName, MobileNumber = this.MobileNumber, Password = this.Password }; cmd.Execute(); } }