Simplifying a series of type checks and casts in a generic method The if/else statements below are not good. How can I improve this method?

public T GetContentByNodeIdSync&lt;T&gt;(Guid nodeId)
{
    var data = m_CMSCatalog.GetContentByNodeId(nodeId);

    if (typeof(T) == typeof(WebFolder))
    {
        var model = (WebFolderDTO)data;
        return Mapper.Map&lt;WebFolderDTO, T&gt;(model);
    }
    else if (typeof(T) == typeof(ContentListItem))
    {
        return Mapper.Map&lt;ContentListItemDTO, T&gt;((ContentListItemDTO)data);
    }
    else if (typeof(T) == typeof(Image))
    {
        return Mapper.Map&lt;ImageDTO, T&gt;((ImageDTO)data);
    }
    else if (typeof(T) == typeof(File))
    {
        return Mapper.Map&lt;FileDTO, T&gt;((FileDTO)data);
    }
    else if (typeof(T) == typeof(Folder))
    {
        return Mapper.Map&lt;FolderDTO, T&gt;((FolderDTO)data);
    }
    else if (typeof(T) == typeof(WebRoot))
    {
        return Mapper.Map&lt;WebRootDTO, T&gt;((WebRootDTO)data);
    }
    else if (typeof(T) == typeof(Article))
    {
        var model = (ArticleDTO)data;
        return Mapper.Map&lt;ArticleDTO, T&gt;(model);
    }
    else if (typeof(T) == typeof(WebContent))
    {
        var model = (WebContentDTO)data;
        return Mapper.Map&lt;WebContentDTO, T&gt;(model);
    }
    return default(T);
}
You should create a Dictionary&lt;Type,Type&gt; that would associate your object's type with their DTO equivalent, so you wouldn't need any if. Then you can use the dictionary to find the types to map. ex : 

//This should be instanciated wherever you want, but try to do it only once. 
//The dictionary should be static
dictionary = new Dictionary&lt;Type,Type&gt;();
dictionary.Add(typeof(File),typeof(FileDTO));
//etc..

public T GetContentByNodeIdSync&lt;T&gt;(Guid nodeId)
{
    var data = m_CMSCatalog.GetContentByNodeId(nodeId);
    Type dtoType;
    bool mapExists = dictionary.TryGetValue(typeof(T), out dtoType); //To make sure you have an existing map in your dictionary.

    if(mapExists)
        return (T)Mapper.Map(data, dtoType, typeof(T));

    return default(T);
}