You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
1.0 KiB
C#

using HighWayIot.Repository.domain;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;
namespace HighWayIot.Repository.service.Impl
{
public class BaseDeviceinfoServiceImpl : IBaseDeviceinfoService
{
Repository<BaseDeviceinfo> _deviceInfoRepository => new Repository<BaseDeviceinfo>("sqlite");
public BaseDeviceinfo GetDeviceInfoByDeviceId(int deviceId)
{
Expression<Func<BaseDeviceinfo, bool>> exp = s1 =>s1.DeviceId == deviceId;
BaseDeviceinfo deviceInfo = _deviceInfoRepository.GetSingle(exp);
return deviceInfo;
}
public List<BaseDeviceinfo> GetDeviceInfoListByProcessId(int ProcessId)
{
Expression<Func<BaseDeviceinfo, bool>> exp = s1 => s1.ProcessId == ProcessId;
List<BaseDeviceinfo> deviceinfos = _deviceInfoRepository.GetList(exp);
return deviceinfos;
}
}
}