diff --git a/SportsStore/SportsStore.WebUI/Infrastructure/NinjectDependencyResolver.cs b/SportsStore/SportsStore.WebUI/Infrastructure/NinjectDependencyResolver.cs index 7873914..7191b44 100644 --- a/SportsStore/SportsStore.WebUI/Infrastructure/NinjectDependencyResolver.cs +++ b/SportsStore/SportsStore.WebUI/Infrastructure/NinjectDependencyResolver.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Configuration; using System.Linq; using System.Web; using System.Web.Mvc; @@ -35,8 +36,14 @@ namespace SportsStore.WebUI.Infrastructure private void AddBindings() { kernel.Bind().To(); + + EmailSettings emailSettings = new EmailSettings + { + WriteAsFile = bool.Parse(ConfigurationManager.AppSettings["Email.WriteAsFile"] ?? "false") + }; + + kernel.Bind().To() + .WithConstructorArgument("settings", emailSettings); } - - } } \ No newline at end of file