using System; using System.Collections.Generic; using WCS.Business.Dto; namespace WCS.Business.Dao { public class PlcDao { public PlcDao() { } private static PlcDao _instance; public static PlcDao Instance() { if (_instance == null) { _instance = new PlcDao(); } return _instance; } /// /// 获取PLC信息 /// /// public List GetLotInfo() { try { List plcs = DataCommon.DBServer.Queryable().ToList(); return plcs; //第二种 SQL语句的方式 //string sql = $"select * FROM t_plc "; //var sqlFunc = DataCommon.DBServer.SqlQueryable(sql); //return sqlFunc.ToList(); } catch (Exception ex) { _ = ex; return new List(); } } } }