Is there any way to make NHibernate.Linq generate a like query on an integer field? The SQL that I want it to generate is:
select IntegerColumn
from Table
where IntegerColumn like '%StringValue%'
I've tried something like:
from entity in _session.Linq<Entity>
where entity.IntegerColumn.ToString().Contains(StringValue)
select entiry.IntegerColumn
This produces an ArgumentOutOfRange exception when it evaluates the query.
Does anyone have an idea how I can accomplish this?
Thanks, Nathan