Exemple #1
0
 public IList <ConnectorDTO> GetExistingConnections()
 {
     try
     {
         //_dbcontext = new InnonAnalyticsEngineEntities();
         ICollection <tblConnector> objtblConnector = _dbcontext.tblConnectors.ToList();
         return(ConnectorDTO.ConvertTableToDTO(objtblConnector));
     }
     catch
     { throw; }
 }
Exemple #2
0
        /// <summary>
        /// Get connection by ConnectorID this method only use for the Connector Page or for datawarehouse, do not use any other page
        /// </summary>
        /// <param name="ConnectorID"></param>
        /// <returns>ConnectorDTO</returns>
        public ConnectorDTO GetExistingConnectionById(int ConnectorID)
        {
            try
            {
                //_dbcontext = new InnonAnalyticsEngineEntities();
                tblConnector objtblConnector = _dbcontext.tblConnectors.SingleOrDefault(s => s.ID == ConnectorID);

                if (objtblConnector == null)
                {
                    throw new ConnectorException(Resources.ConnectorNotFound);
                }

                return(ConnectorDTO.ConvertTableToDTO(objtblConnector));
            }
            catch
            { throw; }
        }