static void Main(string[] args) { var connectionString = ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString; _databaseCleaner = new DatabaseCleaner(connectionString); _dataCounter = new DataCounter(connectionString); var useCases = new UseCase[] { new Transaction(connectionString), new NoTransaction(connectionString) }; foreach (var useCase in useCases) { Console.WriteLine(useCase.GetType().Name); Console.WriteLine(); RunCase(nameof(UseCase.Right), () => useCase.Right()); RunCase(nameof(UseCase.Wrong1), () => useCase.Wrong1()); RunCase(nameof(UseCase.Wrong2), () => useCase.Wrong2()); Console.WriteLine("----------"); Console.WriteLine(); } }
public HomeController(IHomeSliderRepository sliderRepo, IFeaturesItem featuresItemRepo, IDataCounter dataCounterRepo, IGuttersItem guttersItemRepo, IClientCarouselRepository clientCarouselRepo, IRequestQuestionRepository requestQuestionRepo) { sliderRepository = sliderRepo; featuresItemRepository = featuresItemRepo; dataCounterRepository = dataCounterRepo; guttersItemRepository = guttersItemRepo; clientCarouselRepository = clientCarouselRepo; requestQuestionRepository = requestQuestionRepo; }