From bf4277e47e8cd0b1cdfba3e6153766254b274129 Mon Sep 17 00:00:00 2001 From: Jason Zhu Date: Tue, 10 Aug 2021 23:04:15 +1000 Subject: [PATCH] 6.1.5: e.g. 6.13 Using Ninject Self-Binding --- chap6_essential_tools_for_mvc/NinjectDemo/Program.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chap6_essential_tools_for_mvc/NinjectDemo/Program.cs b/chap6_essential_tools_for_mvc/NinjectDemo/Program.cs index ff553e8..617765f 100644 --- a/chap6_essential_tools_for_mvc/NinjectDemo/Program.cs +++ b/chap6_essential_tools_for_mvc/NinjectDemo/Program.cs @@ -22,7 +22,7 @@ namespace NinjectDemo // get the interface implementation IValueCalculator calcImp1 = ninjectKernel.Get(); // create the instance of ShoppingCart and inject the dependency - ShoppingCart cart = new ShoppingCart(calcImp1); + ShoppingCart cart = ninjectKernel.Get(); // perform the calculation and write out the result Console.WriteLine("Total: {0:c}", cart.CalculateStockValue()); }