I want to let my users create specifications to be executed in a nhibernate.Linq query.
Is it possible? I ask the user to write a query string (HQL I suppose) so it will be serializable and in a combobox the user can apply it to current results
I want to let my users create specifications to be executed in a nhibernate.Linq query.
Is it possible? I ask the user to write a query string (HQL I suppose) so it will be serializable and in a combobox the user can apply it to current results
Linq expressions are not serializable.
HQL, on the other hand, is just a string like SQL, so that would work.
But you have to really trust your user, as there is nothing stopping him from typing "DELETE TheMostImportantEntity WHERE 1=1".
One other option may be using the LINQ Dynamic Query Library (see details here: http://weblogs.asp.net/scottgu/archive/2008/01/07/dynamic-linq-part-1-using-the-linq-dynamic-query-library.aspx )