using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using SqlSugar;
namespace IStation.DAL
{
///
/// 管路绑定
///
public partial class PipeLineBinding : CorpDAL
{
///
///
///
public override ConnectionConfig ConnectionConfig
{
get { return ConfigHelper.DefaultConnectionConfig; }
}
///
/// 通过 PatternID 获取
///
public List GetByPipeLineID(long CorpID, long PipeLineID)
{
using (var db = new SqlSugarClient(ConnectionConfig))
{
return db.Queryable()
.Where(x => x.CorpID == CorpID && x.PipeLineID == PipeLineID).ToList();
}
}
///
/// 通过 BindingType 和 BindingID 获取
///
public List GetByBindingTypeAndBindingID(long CorpID, string BindingType, long BindingID)
{
using (var db = new SqlSugarClient(ConnectionConfig))
{
return db.Queryable()
.Where(x => x.CorpID == CorpID && x.BindingType == BindingType && x.BindingID== BindingID).ToList();
}
}
}
}