add params for filtering LeafInputs
This commit is contained in:
+2
-13
@@ -50,22 +50,11 @@ namespace LeafWeb.Core.DAL
|
||||
return _db.LeafInputs.FirstOrDefault(li => li.Id == id);
|
||||
}
|
||||
|
||||
public IQueryable<LeafInput> GetLeafInputs(LeafInputStatusType status)
|
||||
public IQueryable<LeafInput> GetLeafInputs(params LeafInputStatusType[] statuses)
|
||||
{
|
||||
return
|
||||
from file in _db.LeafInputs
|
||||
where file.CurrentStatus == status
|
||||
select file;
|
||||
}
|
||||
|
||||
public IQueryable<LeafInput> GetRunningLeafInputs()
|
||||
{
|
||||
return
|
||||
from file in _db.LeafInputs
|
||||
where
|
||||
file.CurrentStatus == LeafInputStatusType.Running ||
|
||||
file.CurrentStatus == LeafInputStatusType.Starting ||
|
||||
file.CurrentStatus == LeafInputStatusType.Finishing
|
||||
where statuses.Contains(file.CurrentStatus)
|
||||
select file;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user