We are trying to create a cool API using WCF and ICriteria, for example:
[ServiceContract]
public class ProductService
{
[OperationContract]
public List<Product> Get()
[OperationContract]
public List<Product> GetByCriteria(Criteria criteria)
}
We are thinking of using the DetachedCriteria so anyone can send it and we connect this to the Session in the Service for running the Query infront of our DB.
Is there anyone who create such API? Should we use the ICriteria from Nhibernate? Any other cool Ideas?
Thanks.