Пример #1
0
 public DataController(IConfiguration configuration, IDocumentRepository documentRepository, IImageSignature imageSignature, ILoggerFactory logFactory)
 {
     _configuration  = configuration;
     _obj            = new Data(documentRepository);
     _imageSignature = imageSignature;
     _logger         = logFactory.CreateLogger <DataController>();
 }
Пример #2
0
        public void Setup()
        {
            var optionsBuilder = new DbContextOptionsBuilder <DocumentContext>();

            optionsBuilder.UseSqlServer("Data Source=localhost; Initial Catalog=documentDB; uid=sa; password=aloha@123;");
            DocumentContext dbContext = new DocumentContext(optionsBuilder.Options);

            _documentRepository = new MockDocumentRepository(dbContext);

            _imageSignature = new ImageSignature();
        }