コード例 #1
0
        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);
        }
コード例 #2
0
        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();
            }
        }