using DataEntity.Device;
|
using DataRWDAL.Base;
|
using System.Collections.Generic;
|
|
namespace DataRWDAL.Device
|
{
|
/// <summary>
|
/// 设备点位表
|
/// </summary>
|
public class DeviceConfigPointDB : BaseDB
|
{
|
/// <summary>
|
/// 获取设备点位列表
|
/// </summary>
|
/// <param name="projectId"></param>
|
/// <returns></returns>
|
public static List<DeviceConfigPointModel> GetDevicePointByProjectId(string projectId)
|
{
|
using (var db = GetInstance())
|
{
|
return db.Queryable<DeviceConfigPointModel>().Where(it => it.ProjectId.Equals(projectId)).OrderBy(it => it.PointName).ToList();
|
}
|
}
|
|
/// <summary>
|
/// 根据主键ID,设备点位信息
|
/// </summary>
|
/// <param name="id"></param>
|
/// <returns></returns>
|
public static DeviceConfigPointModel GetDevicePointById(string id)
|
{
|
using (var db = GetInstance())
|
{
|
return db.Queryable<DeviceConfigPointModel>().Single(it => it.Id.Equals(id));
|
}
|
}
|
}
|
}
|