public IngestionManagerTests()
        {
            _dbContext  = new Mock <ZionContext>("");
            _dataAccess = new IngestionDataAccess("");

            _manager = new IngestionManager();
            _manager.SetConnectionString("", _dbContext.Object);
        }
        public void UpdateDatasetStatus(int datasetId, string status)
        {
            try
            {
                using (ZionContext dbContext = new ZionContext(_connectionString))
                {
                    IngestionDataAccess ingestionDAL = new IngestionDataAccess(_connectionString);
                    ingestionDAL.MappingStatusUpdateForDatasetId(dbContext, datasetId, status == "Active" ? true : false);
                    ingestionDAL.TempMappingStatusUpdateForDatasetId(dbContext, datasetId, status == "Active" ? true : false);
                    OutgestionDataAccess outgestionDAL = new OutgestionDataAccess(_connectionString);
                    outgestionDAL.OutgestionStatusUpdateForDatasetId(dbContext, datasetId, status == "Active" ? true : false);
                    _datasetMasterDAL.UpdateStatusForDataset(dbContext, datasetId, status);

                    dbContext.SaveChanges();
                }
            }
            catch
            {
                throw;
            }
        }
コード例 #3
0
        public IngestionDataAccessTests()
        {
            _dbContext = new Mock <ZionContext>("");

            _dataAccess = new IngestionDataAccess("", _dbContext.Object);
        }
コード例 #4
0
 public void SetConnectionString(string connectionString, ZionContext dbContext = null)
 {
     _connectionString = connectionString;
     _ingestionDAL     = new IngestionDataAccess(_connectionString, dbContext);
 }