public IQueryable<User> Execute(string customPropertyName, string customPropertyValue) { return queryBuilder.IncludeAll() .Where(u => u.CustomProperties.Any(c => c.Name == customPropertyName && c.Value == customPropertyValue)); }
public IReadOnlyCollection<User> GetUsers(string customPropertyName, string customPropertyValue) { var query = new UsersByCustomPropertyQuery(dbContext.Users); IQueryable<Model.User> users = query.Execute(customPropertyName, customPropertyValue); return new UserMapper().Map(users).ToList(); }