protected List <FilterDefinition <Entities.User> > BuildFilters(Models.User.Condition condition) { var list = new List <FilterDefinition <Entities.User> >(); if (condition == null) { return(list); } if (!String.IsNullOrWhiteSpace(condition.Name)) { list.Add(Builders <Entities.User> .Filter.Regex(nameof(Entities.User.Name), Helper.FormatQueryString(condition.Name))); } if (!String.IsNullOrWhiteSpace(condition.Account)) { list.Add(Builders <Entities.User> .Filter.Regex(nameof(Entities.User.Account), Helper.FormatQueryString(condition.Account))); } return(list); }
protected FilterDefinition <Entities.User> BuildFilter(Models.User.Condition condition) { return(this.BuildFilter(this.BuildFilters(condition))); }