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 SysSequentialService : BaseService, ISysSequentialService
{
public SysSequentialService(DbContext context) : base(context) { }
///
/// 获取时序母表数据
///
///
///
public IEnumerable GetSequentials(string key)
{
return this.Set().Where(m => m.Sequential == key && m.IsDelete == 0).OrderByDescending(n => n.CreateTime);
}
///
/// 获取时序子表数据
///
/// 母表ID
///
public IEnumerable GetSequentialDetails(int key)
{
return this.Set().Where(m => m.SysSquentialID == key && m.IsDelete == 0);
}
///
/// 获取时序子表数据
///
/// 子表ID
///
public IEnumerable GetSequentialDetailList(int key)
{
return this.Set().Where(m => m.Number == key && m.IsDelete == 0);
}
}
}