Click here to Skip to main content
15,888,461 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
In Ecommerce site we using below code for Shopping card helper.

 

private static readonly ITaxEstimationService taxEstimationService = DIContainer.Resolve<ITaxEstimationService>()

 

I am getting below error message.

 

'ITaxEstimationService' is an ambiguous reference between 'Kadena.BusinessLogic.Contracts.ITaxEstimationService' and 'CMS.Ecommerce.ITaxEstimationService'.

What I have tried:

<pre>

If I changed the below code the value is return zero.

private static readonly BusinessLogic.Contracts.ITaxEstimationService taxEstimationService = DIContainer.Resolve<BusinessLogic.Contracts.ITaxEstimationService>();             
Posted
Updated 8-Dec-19 4:46am

1 solution

What the is an ambiguous reference between means is that there are multiple references that match what you are requesting.
The solution is to determine which one you need to use and call it by its fully qualified name.

Try one or the other of these lines out; and see which one works out better for you
C#
private static readonly ITaxEstimationService taxEstimationService = DIContainer.Resolve<Kadena.BusinessLogic.Contracts.ITaxEstimationService>()
/* OR */
private static readonly ITaxEstimationService taxEstimationService = DIContainer.Resolve<CMS.Ecommerce.ITaxEstimationService>()
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900