public void Initialize() { _connectionFactory = new ConnectionFactory(ConfigurationManager.AppSettings["CategoriesAppDb"]); _categoriesRepository = new CategoriesRepository(_connectionFactory); var sql = new StringBuilder(); sql.Append($"DELETE FROM {Db};"); sql.Append($"SET IDENTITY_INSERT {Db} ON;"); sql.Append($"INSERT INTO {Db} ([Id], [Name], [ParentId]) VALUES (1, N'Category1', NULL);"); sql.Append($"INSERT INTO {Db} ([Id], [Name], [ParentId]) VALUES (2, N'Category2', 1);"); sql.Append($"INSERT INTO {Db} ([Id], [Name], [ParentId]) VALUES (3, N'Category3', NULL);"); sql.Append($"INSERT INTO {Db} ([Id], [Name], [ParentId]) VALUES (4, N'Category4', 2);"); sql.Append($"SET IDENTITY_INSERT {Db} OFF;"); using (var connection = _connectionFactory.Get()) connection.Execute(sql.ToString()); }
public CategoriesService(CurrentUserContext userContext, ICategoriesRepository repository, IMapper mapper) { _userContext = userContext; _repository = repository; _mapper = mapper; }
public CreateCategory() { InitializeComponent(); categoriesRepository = new CategoryRepository(new GreenLandProjectEntities()); }
public HomeController(ICategoriesRepository categoriesRepository, IReviewRepository reviewRepository) { _categoriesRepository = categoriesRepository; _reviewRepository = reviewRepository; }
public CategoriesController(ICategoriesRepository _CategoryRepository) { CategoriesRepository = _CategoryRepository; }
public CategoriesController(ICategoriesRepository categoriesRepository) { _categoriesRepository = categoriesRepository; }
public MoviesController(IMoviesRepository moviesRepository, ICategoriesRepository categoriesRepository) { _moviesRepository = moviesRepository; _categoriesRepository = categoriesRepository; }
public ReviewsController(IReviewRepository reviewRepository, ICategoriesRepository categoriesRepository) { _reviewRepository = reviewRepository; _categoriesRepository = categoriesRepository; }
public CategoriesService() { cr = new CategoriesRepository(); }
public SubcategoriesController(ISubcategoriesRepository subcategoriesRepository, ICategoriesRepository categoriesRepository) { _categoriesRepository = categoriesRepository; _subcategoriesRepository = subcategoriesRepository; }
public DataManager(IUsersRepository users, IPositionsRepository positions, ISalariesRepository salaries, IProductsRepository products, ICategoriesRepository categories, ISalesRepository sales, ISaleProductsRepository saleProducts) { Users = users; Positions = positions; Salaries = salaries; Products = products; Categories = categories; Sales = sales; SaleProducts = saleProducts; }
public ApiCategoriesController(ICategoriesRepository categoriesRepository) { this.categoriesRepository = categoriesRepository; }
public DeleteCategoryUseCase(ICategoriesRepository repository) { _repository = repository; }
public QuestionsRepository(ISqlDataAccess sqlDataAccess, ICategoriesRepository categoriesRepository, IAnswerRepository answerRepository) { _sqlDataAccess = sqlDataAccess; _categoriesRepository = categoriesRepository; _answerRepository = answerRepository; }
public CategoriesBusinessService(ICategoriesRepository categoriesRepository, IUnitOfWork unitOfWork) { _categoryRepository = categoriesRepository; _unitOfWork = unitOfWork; }
public CategoriesService(ICategoriesRepository categoriesRepository) { _categoriesRepo = categoriesRepository; }
public ProductsController(ICategoriesRepository categoriesRepository, IProductsRepository productsRepository) { this.categoriesRepository = categoriesRepository; this.productsRepository = productsRepository; }
public ExpensesController(IExpensesRepository expenseRepository, ICategoriesRepository categoriesRepository) { _expensesRepository = expenseRepository; _categoriesRepository = categoriesRepository; }
public CategoriesWebPart() { _categoriesRepo = WebPartUnityContainer.Current.Container.Resolve<ICategoriesRepository>(); _booksRepo = WebPartUnityContainer.Current.Container.Resolve<IBooksRepository>(); _externalSearchService = WebPartUnityContainer.Current.Container.Resolve<IExternalSearchService>(); }
public CategoriesController(ICategoriesRepository categoriesRepository, IQuestionnairesRepository questionnairesRepository) { this._categoriesRepository = categoriesRepository; this._questionnairesRepository = questionnairesRepository; }
public void SetUp() { _categoriesRepository = new FakeCategoriesRepository(); _categoriesController = new CategoriesController(_categoriesRepository); }
public CategoriesController() { this.categoryRepository = new CategoriesRepository(); }
public AdminController(ICategoriesRepository categoriesRepository, IMoviesRepository moviesRepository) { _categoriesRepository = categoriesRepository; _moviesRepository = moviesRepository; }
public CategoriesService(ICategoriesRepository repository, IGroupsRepository _groupsRepository, IAuthorizationService _authorizationService) { categoriesRepository = repository; groupsRepository = _groupsRepository; authorizationService = _authorizationService; }
public CategoriesApiController(IRepositories repositories, ILog log) : base(log) { this.categoriesRepository = repositories.CategoriesRepository; }
public ArticlesController(IArticlesRepository articlesRepository, ICategoriesRepository categoriesRepository) { _articlesRepository = articlesRepository; _categoriesRepository = categoriesRepository; }
private static CategoriesController BuildController(ICategoriesRepository repository) => new CategoriesController( Substitute.For <IGetCategoriesUseCase>(), Substitute.For <IDeleteCategoryUseCase>(), new CreateCategoryUseCase(repository));
public CategoriesService(ICategoriesRepository categoryRepository, IMapper mapper) { _categoryRepository = categoryRepository; _mapper = mapper; }
public AddTransactionRecordResult(JournalDTO journal, ICategoriesRepository repository, decimal prevBalance) : base(journal, repository) { Balance = prevBalance; }
public SellerController(ILotsRepository lotsRepository, ICategoriesRepository categoriesRepository) { this.categoriesRepository = categoriesRepository; this.lotsRepository = lotsRepository; }
public CategoriesController(ICategoriesRepository categoryRepository) { _categoryRepository = categoryRepository; }
public BusinessesController(IBusinessRepository _businessRepo, ICategoriesRepository _categoryRepo, IBusinessFormsRepo _formsRepo) { this.businessRepo = _businessRepo; this.categoryRepo = _categoryRepo; this.formsRepo = _formsRepo; }
public CategoriesController(ICategoriesRepository repository) { _repository = repository; }
public GetCategoriesUseCase( ICategoriesRepository repository) { _repository = repository; }
public CategoriesService(ICategoriesRepository categoriesRepository) { _categoriesRepository = categoriesRepository; }
public CategoriesService(IMapper mapper, ICategoriesRepository categoriesRepository) { _mapper = mapper; _categoriesRepository = categoriesRepository; }
public void SetUp() { _moviesRepository = new FakeMoviesRepository(); _categoriesRepository = new FakeCategoriesRepository(); _moviesController = new MoviesController(_moviesRepository, _categoriesRepository); }
public CategoriesController(ICategoriesRepository repository) { _repository = repository; }
public PostViewModelBuilder(IPostsRepository postsRepository, ICategoriesRepository categoriesRepository, ITagsRepository tagsRepository) { _postsRepository = postsRepository; _categoriesRepository = categoriesRepository; _tagsRepository = tagsRepository; }
public CategoriesService(ICategoriesRepository categoriesRepository) { Protector.SetIfNotNull(ref _categoriesRepository, categoriesRepository); }
public HomeController(IDocumentsRepository documentsRepository, ICategoriesRepository categoriesRepository) { this.documentsRepository = documentsRepository; this.categoriesRepository = categoriesRepository; }
public CategoriesController(ICategoriesRepository categoriesRepository, IMapper mapper) { _categoriesRepository = categoriesRepository; _mapper = mapper; }
public BrowseController(IDocumentsRepository documentsRepository, ICategoriesRepository categoriesRepository, IHistoryRepository historyRepository) { this.documentsRepository = documentsRepository; this.categoriesRepository = categoriesRepository; this.historyRepository = historyRepository; }
public CategoriesController(ICategoriesRepository categoriesRepo) { _categoriesRepo = categoriesRepo; }
public HomeController(ICategoriesRepository categoriesRepository, IReviewRepository reviewRepository) { _categoriesRepository = categoriesRepository; _reviewRepository = reviewRepository; }
public WidgetsModelBuilder(IPostsRepository postsRepository, ICategoriesRepository categoriesRepository, ITagsRepository tagsRepository) { _categoriesRepository = categoriesRepository; _postsRepository = postsRepository; _tagsRepository = tagsRepository; }