Why doesn't StringComparison.InvariantCultureIgnoreCase work with this db4o linq query?

The following query is executed. I get the correct result when I enter the name with the wrong case.

private static IObjectContainer db = Db4oFactory.OpenFile(db4oPath);

    public static IQueryable<Company> GetCompaniesByName(string name) { 
        return (from Company c in db
                where c.Name.ToLowerInvariant().Equals(name.ToLowerInvariant())
                select c).AsQueryable();
    }

The following query with the same parameter (basically the same unit test) does not return results. Note that the only difference is the where clause.

    public static IQueryable<Company> GetCompaniesByName(string name) { 
        return (from Company c in db
                where c.Name.Equals(name, StringComparison.InvariantCultureIgnoreCase)
                select c).AsQueryable();
    }

Why?

+3
source share
1 answer

LINQ ( ) , . LINQ-to-SQL EF , - ( , ), , Db4o " ".

Db40 ? , - ... ...

+2

Source: https://habr.com/ru/post/1705341/


All Articles