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; } }
public IngestionDataAccessTests() { _dbContext = new Mock <ZionContext>(""); _dataAccess = new IngestionDataAccess("", _dbContext.Object); }
public void SetConnectionString(string connectionString, ZionContext dbContext = null) { _connectionString = connectionString; _ingestionDAL = new IngestionDataAccess(_connectionString, dbContext); }