using InSituLaboratory.Entities;
using InSituLaboratory.IService;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace InSituLaboratory.Service
{
public class SysDeviceService : BaseService, ISysDevcieService
{
public SysDeviceService(DbContext context) : base(context)
{
}
///
/// 根据搜索关键词进行数据检索
///
///
///
public IEnumerable GetDevices(string key)
{
// 需要将搜索关键词加入判断。。。。。。
return this.Set()
.Where(m =>
string.IsNullOrEmpty(key) ||
m.DeviceType.Contains(key) ||
m.DeviceName.Contains(key)
);
}
}
}