コード例 #1
0
        public async Task <AppUser> Add
        (
            AppUserName userName,
            IHashedPassword password,
            PersonName name,
            EmailAddress email,
            DateTimeOffset timeAdded
        )
        {
            var newUser = new AppUserRecord
            {
                UserName  = userName.Value,
                Password  = password.Value(),
                Name      = name.Value,
                Email     = email.Value,
                TimeAdded = timeAdded
            };
            await factory.DB.Users.Create(newUser);

            return(factory.User(newUser));
        }
コード例 #2
0
 public Task ChangePassword(IHashedPassword password)
 => factory.DB.Users.Update(record, u => u.Password = password.Value());