Exemplo n.º 1
0
 public UeditorService(UploadDBContext dbContext, INotSupportedHandler NotSupportedHandler, IConfigHandler configHandler, IUploadHandler uploadHandler, IEditorConfig editorConfig, IListFileHandler listFileHandler, ICrawlerHandler crawlerHandler)
 {
     this._notSupportedHandler = NotSupportedHandler;
     this._configHandler       = configHandler;
     this._uploadHandler       = uploadHandler;
     this._editorConfig        = editorConfig;
     this._listFileHandler     = listFileHandler;
     this._crawlerHandler      = crawlerHandler;
 }
Exemplo n.º 2
0
        public UploadDBContext CreateContextForInMemory()
        {
            var option = new DbContextOptionsBuilder <UploadDBContext>().UseInMemoryDatabase(databaseName: "Upload_Database").Options;

            var context = new UploadDBContext(option);

            if (context != null)
            {
                context.Database.EnsureDeleted();
                context.Database.EnsureCreated();
            }

            return(context);
        }
Exemplo n.º 3
0
 public UploadService(UploadDBContext dbContext, IOptions <RemoteSave> setting)
 {
     this._dbContext  = dbContext;
     this._remoteSave = setting.Value;
 }
Exemplo n.º 4
0
 public UploadService(ILogger <UploadService> logger, UploadDBContext context)
 {
     _logger  = logger;
     _context = context;
 }