Пример #1
0
 public static void CreateUser(CreateUser request, Func<IUserRepository> userRepositoryFactory, ILogger logger)
 {
     using (var userRepository = userRepositoryFactory())
     {
         var user = new User { Name = request.Name };
         userRepository.Add(user);
         userRepository.Save();
         logger.Info("UserServiceModule: User Created");
     }
 }
Пример #2
0
 public void Add(User user)
 {
     _users.Add(user);
 }