using iWareCommon.Common.Dao; using iWareLog.LOG.Entity; using iWareLog.ORM; using System.Collections.Generic; using System.Linq; namespace iWareLog.LOG.Dao { public class AlertDao : CommonDao { private static object Lock = new object(); private AlertDao() { } private static AlertDao Instance = null; /// /// 获取单例的方法 /// /// log服务的单例实体 public static AlertDao GetInstance() { if (Instance == null) { lock (Lock) { if (Instance == null) { Instance = new AlertDao(); } } } return Instance; } protected override string GetColumnName(string name) { return AlertEntity.GetColumnName(name); } protected override string GetTableName() { return AlertEntity.GetTableName(); } protected override AlertEntity ToEntity(DEVAlert receive) { return new AlertEntity(receive); } protected override DEVAlert ToOrm(AlertEntity receive) { return receive.ToOrm(); } protected override List GetColumnNames() { return AlertEntity.GetColumnMap().Keys.ToList(); } } }