public CompanyTesting() { UnityConfigurationSection config = ConfigurationManager.GetSection("unity") as UnityConfigurationSection; IUnityContainer container = new UnityContainer(); config.Configure(container); DAL = new DataAccessLayer(container.Resolve<IDataAccessLayer>("SQL")); }
public DataAwareController() { //DependencyInjection UnityConfigurationSection config = ConfigurationManager.GetSection("unity") as UnityConfigurationSection; IUnityContainer container = new UnityContainer(); config.Configure(container); DAL = new DataAccessLayer(container.Resolve<IDataAccessLayer>("SQL")); }