Пример #1
0
        public async Task Active(long userId, string password)
        {
            var user = await FindByIdAsync(userId);

            if (user == null)
            {
                throw new Exception("User not found");
            }

            await base.AddPasswordAsync(userId, password);

            await _userRepository.Active(user);
        }
        public IActionResult Active()
        {
            List <UserDTO> users = repository.Active();

            return(new ObjectResult(users));
        }
Пример #3
0
 /// <summary>
 /// The Active
 /// </summary>
 /// <param name="key">The key<see cref="string"/></param>
 /// <returns>The <see cref="int"/></returns>
 public int Active(string key)
 {
     return(userRepository.Active(key));
 }