Q:

DD4T 2 with Tridion 9

I need to write .net application using DD4T and Tridion 9.  Please suggest the steps that I can follow ? 

A:

If you use one of the Html. RenderXXX methods in DD4T, the component presentations will be rendered with a controller and action.  You need to create this controller first, by extending the DD4T.Mvc. Controller. ModelControllerBase class, like this:
public ComponentPresentationController : ModelControllerBase
{
    public ComponentPresentationController(IPageFactory pageFactory, IComponentPresentationFactory componentPresentationFactory, ILogger logger, IDD4TConfiguration dd4tConfiguration, IViewModelFactory viewModelFactory) : 
       : base (pageFactory, componentPresentationFactory, logger, dd4tConfiguration, viewModelFactory)
    {
    }
}

Next, you need to tell DD4T that you want to use this controller to render component presentations.  You do this by adding the following to your Web.config:
<add key="DD4T.ComponentPresentationController" value="Component" /> 
<add key="DD4T.ComponentPresentationAction" value="ComponentModel" />

