public void UpdateInterfaceHeirarchyStatus(ZionContext _dbContext, int interfaceId, string status)
        {
            IngestionDataAccess     ingestionDAL  = new IngestionDataAccess(_connectionString);
            OutgestionDataAccess    outgestionDAL = new OutgestionDataAccess(_connectionString);
            DatasetMasterDataAccess dsDAL         = new DatasetMasterDataAccess(_connectionString);
            TemplateDataAccess      dtDAL         = new TemplateDataAccess(_connectionString);
            List <DatasetMaster>    datasets      = _dbContext.DatasetMaster.Where(ds => ds.InterfaceId == interfaceId).ToList();

            datasets.ForEach(ds => UpdateDatasetHeirarchyStatus(_dbContext, ds.DatasetId, status,
                                                                ingestionDAL, outgestionDAL, dsDAL, dtDAL)
                             );
        }
 public void SetConnectionString(string connectionString)
 {
     _connectionString = connectionString;
     _datasetMasterDAL = new ZionWeb.DAL.DatasetMasterDataAccess(_connectionString);
 }
 private void UpdateDatasetHeirarchyStatus(ZionContext _dbContext, int datasetId, string status,
                                           IngestionDataAccess ingestionDAL, OutgestionDataAccess outgestionDAL, DatasetMasterDataAccess dsDAL,
                                           TemplateDataAccess dtDAL)
 {
     //Update the status of heirarchy
     ingestionDAL.MappingStatusUpdateForDatasetId(_dbContext, datasetId, status == "Active" ? true : false);
     ingestionDAL.TempMappingStatusUpdateForDatasetId(_dbContext, datasetId, status == "Active" ? true : false);
     dsDAL.UpdateStatusForDataset(_dbContext, datasetId, status);
     //dtDAL.TemplateStatusUpdateForDatasetId(_dbContext, datasetId, status);
     outgestionDAL.OutgestionStatusUpdateForDatasetId(_dbContext, datasetId, status == "Active" ? true : false);
 }