Exemple #1
0
        public IList <Alert> GetPendingAlertsByPriority(int id)
        {
            List <Alert> result = new List <Alert>();

            if (string.IsNullOrEmpty(_connectionString))
            {
                return(result);
            }
            using (var db = new AlertModelContainer(_connectionString))
            {
                result = db.GetPendingAlertsByPriority(id).Select(alrts => new Alert
                {
                    Id                     = alrts.ALRT_ID,
                    AlertDT                = alrts.ALRT_CRE_DTTM,
                    AlertTypeName          = alrts.ALRT_TYPE_NME,
                    FacilityName           = alrts.FAC_NME,
                    Equipment              = alrts.EQPT_ITEM_DESC,
                    SourceSystem           = alrts.ALRT_SS_NME,
                    SourceSystemCreateDate = alrts.CRE_DTTM,
                    SourceSystemDetail     = alrts.ALRT_SS_DTL_TXT
                }).ToList();
            }
            return(result);
        }