lixiaojun
2025-04-09 0f99680aff09e91f521b5909aab42811c1c3e6f1
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
using Yw.DAL.PostgreSql;
 
namespace HStation.DAL.PostgreSql
{
    /// <summary>
    ///
    /// </summary>
    public partial class XhsScheme : BaseDAL_Paras_Flags_Sorter_UseStatus<Entity.XhsScheme>, IXhsScheme
    {
        /// <summary>
        ///
        /// </summary>
        public override ConnectionConfig ConnectionConfig
        {
            get { return Xhs.ConfigHelper.PostgreSqlConnectionConfig; }
        }
 
 
        /// <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();
            }
        }
 
    }
}