using FY.BLL; using Platform.Infrastructure.SignalRLayer.Entity; using System; using System.Collections.Generic; using System.Linq.Expressions; namespace Platform.Infrastructure.SignalRLayer.Service { public class SignalRMessage : ISignalRMessage { BLL_Common common = new BLL_Common(); /// /// 新增 /// /// MessageEntity /// public bool Add(TBL_SYS_NOTICE message) { return common.Insert(message); } /// /// 更新 /// /// MessageEntity /// public bool Update(TBL_SYS_NOTICE message) { return common.Update(message); } /// /// 删除 /// /// /// //public bool Delete(MessageEntity message) //{ // return common.Delete(message); //} /// /// 删除 /// /// /// public bool Delete(Expression> expression) { return common.Delete(expression); } /// /// 查询 /// /// /// public TBL_SYS_NOTICE FirstOrDefault(Expression> expression) { return common.FirstOrDefault(expression); } /// /// 查询总条数 /// /// /// public int GetTotalCount(Expression> expression) { return common.Count(expression); } /// /// 查询所有数据 /// /// public List GetAll() { return common.SelectList(); } /// /// 根据条件查询 /// /// 条件表达式 /// public List GetAllByCondition(Expression> expression) { return common.SelectList(expression); } /// /// 根据条件查询 /// /// 条件字符串 /// public List GetAllByCondition(string condition) { return common.SelectList(condition); } /// /// 根据条件查询单条数据 /// /// 条件表达式 /// public TBL_SYS_NOTICE GetSingal(Expression> expression) { return common.Single(expression); } /// /// 根据主键查询单条数据 /// /// 主键条件字符串 /// public TBL_SYS_NOTICE GetSingal(string condition) { return common.InSingle(condition); } } }