Exemple #1
0
 public GetUsersOutput CreateUsers(CreateUsersInput input)
 {
     if (input.Users == null)
         throw new ArgumentNullException("input");
     var userDtos = this.PerformCreateObjects<List<UserDto>, UserDto, User>(input.Users,
         _userRepository,
         dto =>
         {
             if (dto.RegisteredDate == null)
                 dto.RegisteredDate = DateTime.Now;
         },
         ar =>
         {
             var shoppingCart = ar.CreateShoppingCart();
             _shoppingCartRepository.Insert(shoppingCart);
         });
     return new GetUsersOutput
     {
         Users = userDtos
     };
 }
Exemple #2
0
 public GetUsersOutput CreateUsers(CreateUsersInput input)
 {
     return _userServiceImp.CreateUsers(input);
 }