public ServiceBase(DependencyDTO dependencyDTO) { this.DependencyDTO = dependencyDTO; this.Mapper = this.DependencyDTO.Mapper; this.DBContext = this.DependencyDTO.RefactorContext; this.CRUDHelper = this.DependencyDTO.CrudHelper; }
private void SetupDBContext() { var connection = DbConnectionFactory.CreateTransient(); this.DBContext = new RefactorContext(connection); this.DBContext.Products.AddRange(TestData.Products); this.DBContext.ProductOptions.AddRange(TestData.ProductOptions); this.DBContext.SaveChanges(); }
public DependencyDTO(IMapper mapper, RefactorContext refactorContext, CRUDHelper crudHelper) { this.Mapper = mapper; this.RefactorContext = refactorContext; this.CrudHelper = crudHelper; }
public CRUDHelper(RefactorContext refactorContext, IMapper mapper) { this.DBContext = refactorContext; this.Mapper = mapper; }