using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace GDNXFD.Data { public class WarningRepository { /// /// 获取所有有故障编码的报警 /// /// public static IList GetWarningInfoHaveFaultCode() { IList wList = new List(); try { using (GDNXFDDbContext ctx = new GDNXFDDbContext()) { wList = ctx.Warning.Where(s => !string.IsNullOrEmpty(s.FaultCode)).ToList(); } } catch (Exception ex) { } return wList; } } }