You are probably creating the query incorrectly (concatenating strings, maybe?)
All these works:
session.CreateCriteria<Test2>()
.Add(Restrictions.Like("FirstName", ":%"))
.UniqueResult<Test2>();
session.CreateQuery("from Test2 where FirstName like :expr")
.SetParameter("expr", ":%")
.UniqueResult<Test2>();
source
share