public void UpdateUser(UserDTO userDTO, DateTime dateStamp)
 {
     if (userDTO == null)
     {
         throw new ArgumentNullException("User model is null.");
     }
     tblM_User user = userFactory.CreateFromDbAndUpdateFromDTO(userDTO, dateStamp);
 }
Exemplo n.º 2
0
        public void UpdateUser(UserDTO userDTO, DateTime dateStamp)
        {
            if (userDTO == null)
            {
                throw new ArgumentNullException("User model is null.");
            }
            UserDetailUpdateHandler userDetailCreateHandler =
                new UserDetailUpdateHandler(Db, User, new UserDetailValidator(), new UserDetailFactory(Db, User), new UserDetailQuery(), new AccessControl(User));

            var userDetailSaveResult = userDetailCreateHandler.Save(userDTO, dateStamp);

            if (userDetailSaveResult.Success)
            {
                tblM_User user = userFactory.CreateFromDbAndUpdateFromDTO(userDTO, dateStamp);
                //Db.SaveChanges();
            }
        }