using DataEntity.Device;
|
using DataRWDAL.Base;
|
using System.Collections.Generic;
|
|
namespace DataRWDAL.Device
|
{
|
/// <summary>
|
/// 设备类型表
|
/// </summary>
|
public class DeviceConfigTypeDB : BaseDB
|
{
|
/// <summary>
|
/// 获取设备类型列表
|
/// </summary>
|
/// <param name="projectId"></param>
|
/// <returns></returns>
|
public static List<DeviceConfigTypeModel> GetAlllList(string projectId)
|
{
|
using (var db = GetInstance())
|
{
|
return db.Queryable<DeviceConfigTypeModel>().Where(it => it.ProjectId.Equals(projectId)).ToList();
|
}
|
}
|
|
/// <summary>
|
/// 获取设备类型信息
|
/// </summary>
|
/// <param name="id"></param>
|
/// <returns></returns>
|
public static DeviceConfigTypeModel GetInfodById(string id)
|
{
|
using (var db = GetInstance())
|
{
|
return db.Queryable<DeviceConfigTypeModel>().Single(it => it.Id.Equals(id));
|
}
|
}
|
}
|
}
|