nhibernate hql with named parameter
问题 I have implemented a search function using Castel Active Record. I thought the code is simple enough but I kept getting NHibernate.QueryParameterException : could not locate named parameter [searchKeyWords] errors. Can someone tell me what went wrong? Thanks a million. public List<Seller> GetSellersWithEmail(string searchKeyWords) { if (string.IsNullOrEmpty(searchKeyWords)) { return new List<Seller>(); } string hql = @"select distinct s from Seller s where s.Deleted = false and ( s.Email like