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