Support multiple agent types filtering
This commit is contained in:
parent
ad0e35157d
commit
5f7a8e5480
|
|
@ -352,7 +352,8 @@ namespace BotSharp.Core.Repository
|
|||
|
||||
if (filter.Type != null)
|
||||
{
|
||||
query = query.Where(x => x.Type == filter.Type);
|
||||
var types = filter.Type.Split(",");
|
||||
query = query.Where(x => types.Contains(x.Type));
|
||||
}
|
||||
|
||||
if (filter.IsPublic.HasValue)
|
||||
|
|
|
|||
|
|
@ -284,7 +284,8 @@ public partial class MongoRepository
|
|||
|
||||
if (filter.Type != null)
|
||||
{
|
||||
filters.Add(builder.Eq(x => x.Type, filter.Type));
|
||||
var types = filter.Type.Split(",");
|
||||
filters.Add(builder.In(x => x.Type, types));
|
||||
}
|
||||
|
||||
if (filter.IsPublic.HasValue)
|
||||
|
|
|
|||
Loading…
Reference in a new issue