예제 #1
0
 public bool DeleteUserById(User userId)
 {
     _repositoryFactory.RunInTransaction(() =>
     {
         _userRepository.DeleteEntity(userId);
     });
     return true;
 }
예제 #2
0
 public bool AddUser(User user)
 {
     _repositoryFactory.RunInTransaction(() =>
     {
         _userRepository.AddEntity(user);
     });
     return true;
 }
예제 #3
0
        private User CollectUser()
        {
            var user = new User
            {
                UserId = Guid.NewGuid(),
                Name = Environment.UserName,
                DomainName = Environment.UserDomainName,
                LogTime = DateTime.Now
            };

            using (var userServiceClient = new UserServiceClient())
            {
                userServiceClient.AddUser(user);
                user = userServiceClient.GetUserById(user.UserId);
            }
            return user;
        }