Whatever about supporting some sort of duck-typing? If the method is named Like, and is from a class named SqlMethods, but from whatever namespace..
This way if someone does not want a hard dependency on NH, it just a matter of defining such class (with empty body) on his own source code.. Just an idea. Sent from my iPad On 04/01/2013, at 13:26, Oskar Berggren <[email protected]> wrote: > In JIRA we have the following unresolved feature requests: > > NH-3301 Support SqlMethods.Like() in LINQ queries. > NH-3302 Support for VB LINQ like operator > > > The current state of affairs is that in e.g. 3.3.2 there is, to my > knowledge, no way to query with patterns such as 'a%b', that is where > the wildcard is not a suffix or prefix. I would like to improve on > this, in 3.3.3 if possible. > > > SqlMethods.Like() is from the System.Data.Linq.SqlClient namespace, > i.e. Linq2SQL. This is a bit... weird... but it is available > everywhere, and we can support it without actually adding a dependency > to NHibernate (see code in NH-3301). A possible drawback could be the > risk of creating an expectation that the other methods in SqlMethods > should also be supported. The alternative I guess would be to create a > similar method in NHibernate.Linq namespace. > > Any thoughts on this? > > > /Oskar
