suppose i have a interface and class like this
public interface ILienholderBusinessService
{
string GetCoverage(IList<PolicyVinRequest> InputList);
}
public class LienholderBusinessService : ILienholderBusinessService
{
public ILienholderPolicySearchDataService LienholderPolicySearchDataService { get; set; }
public LienholderBusinessService(ILienholderPolicySearchDataService LienholderPolicySearchDataService )
{
this.LienholderPolicySearchDataService =LienholderPolicySearchDataService ;
}
public string GetCoverage(IList<PolicyVinRequest> InputList)
{
return "my string";
}
}
I have a controller like this
public class InsuranceVerificationPortalController : Controller
{
public ILienholderBusinessService LienholderBusinessService { get; set; }
public InsuranceVerificationPortalController(ILienholderBusinessService LienholderBusinessService)
{
this.LienholderBusinessService = LienholderBusinessService;
}
}
now when i try to implement unity in my MVC, i get error like
are you missing any type
How can i implement DI using Unity on a class which has a constructor