public InventoryHandler(ISqLiteDataAccess dataAccess, IProductCategoryValidator productCategoryValidator, IProductValidator productValidator, IUserInterface userInterface) { _dataAccess = dataAccess; _productCategoryValidator = productCategoryValidator; _productValidator = productValidator; _userInterface = userInterface; }
static void Main(string[] args) { var container = AutoFacContainer.Configure(); using (var scope = container.BeginLifetimeScope()) { //Todo: How to set dBName parameter. It only works because I gave a default value in the constructor. ISqLiteDataAccess sqLiteDataAccess = scope.Resolve <ISqLiteDataAccess>(new NamedParameter("dBName", "InventoryDB.sqlite")); IApplication app = scope.Resolve <IApplication>(); app.RunApp(); } }