using System; using System.Collections.Generic; using System.Data; using System.Linq; using SqlSugar; namespace IStation.DAL { /// /// 系统字典值 /// public partial class SysDictData : BaseDAL_Sorter_UseStatus { /// /// /// public override ConnectionConfig ConnectionConfig { get { return ConfigHelper.DefaultConnectionConfig; } } /// /// 通过 TypeID 获取 /// public List GetByTypeID(long TypeID) { if (TypeID < 1) return default; using (SqlSugarClient db = new SqlSugarClient(ConnectionConfig)) { return db.Queryable().Where(x => x.TypeID == TypeID).ToList(); } } /// /// 通过 TypeID 删除 /// public bool DeleteByTypeID(long TypeID) { if (TypeID < 1) return default; using (SqlSugarClient db = new SqlSugarClient(ConnectionConfig)) { return db.Deleteable().Where(x => x.TypeID == TypeID).ExecuteCommandHasChange(); } } } }