Question: I need to map a DTO object to an object that my webservice will accept.

DTO object:

```
public class TerminationCause
{
    // other properties...

    public List<TerminationCauseServicePurchase> TerminationCauseServicePurchase { get; set; }

    public TerminationCause()
    {
        TerminationCauseServicePurchase = new List<TerminationCauseServicePurchase>();
    }
}

```

Web service object:

```
public partial class TerminationCause
{
    public object[] TerminationCauseServicePurchase { get; set; }

    // other properties...
}

```

All the "other properties" have the same names and the TerminationCauseServicePurchase classes are identical. The problem is that the field TerminationCauseServicePurchase does not get mapped.

Here are the mappings:

```
Mapper.CreateMap<DTO.TerminationCause, ExternalUdbudsportal.TerminationCause>();
Mapper.CreateMap<DTO.TerminationCauseServicePurchase, ExternalUdbudsportal.TerminationCauseServicePurchase>();

```

TerminationCause object gets mapped properly, but it's inner list "TerminationCauseServicePurchase" remains the same type (DTO.TerminationCauseServicePurchase instead of ExternalUdbudsportal.TerminationCauseServicePurchase), which the web service does not accept.

The map method:

```
upEkst.TerminationCause tmpTC = Mapper.Map<DTO.TerminationCause, upEkst.TerminationCause>(tc);

```

Answer: 
Personally, I would use plain CSS to hide the elements and doing so by adding a class to the `body` - tag.

```
<body class="initial-hide">
  ...
</body>

```

The CSS would look something like this then

```
body.initial-hide #element1, body.initial-hide #element2{
   display: none;
}

```

This way, all you need to do to show the hidden elements is to remove the class from the body - tag to show the elements:

```
$(document).ready() {
    $('body').removeClass('initial-hide');
}

```

instead of having to select every element on it's own to call the `.show()` - function on them.
If you set style="display:none;" on the element, then later with jquery you can call the .show method to make them appear.