ningshuxia
2025-04-01 ef2ed31abaaec51c035c53d7596e788af4beb40a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
using Yw.DAL.SQLite;
 
namespace HStation.DAL.SQLite
{
    /// <summary>
    ///
    /// </summary>
    public partial class XhsScheme : BaseDAL_Paras_Flags_Sorter_UseStatus<Entity.XhsScheme>, IXhsScheme
    {
        /// <summary>
        ///
        /// </summary>
        public override ConnectionConfig ConnectionConfig
        {
            get { return Xhs.ConfigHelper.SQLiteConnectionConfig; }
        }
 
 
        /// <summary>
        /// 通过 SiteID 获取
        /// 
        /// </summary>
        public List<Entity.XhsScheme> GetBySiteID(long SiteID)
        {
            using (var db = new SqlSugarClient(ConnectionConfig))
            {
                return db.Queryable<Entity.XhsScheme>()
                    .Where(x => x.SiteID == SiteID).ToList();
            }
        }
 
        /// <summary>
        /// 通过 SiteID 删除
        /// </summary>
        public bool DeleteBySiteID(long SiteID)
        {
            using (var db = new SqlSugarClient(ConnectionConfig))
            {
                return db.Deleteable<Entity.XhsScheme>()
                    .Where(x => x.SiteID == SiteID).ExecuteCommandHasChange();
            }
        }
 
    }
}