Hi
I am using LLBLGen Pro v.2, Adapter template. I am working on a proof of concept sample application and I want to achieve equavelant of the following MS SQL statement (using Adventure works database):
select * from sales.salesorderHeader
where month(orderDate) =9;
Here is what I have done, that doesn't work:
RelationPredicateBucket bucket = new RelationPredicateBucket();
IPredicateExpression filter3 = new PredicateExpression();
filter3.Add( new DbFunctionCall("Month", new object[] { SalesOrderHeaderFields.OrderDate }) == int.Parse(txtParameter3.Text));
...
where txtParameter3 is a text box that will contain the month for which I want to retrieve orders.
I get an error on the last line of code above, that says == cannot be used for such comparison.
I know that in the manual there is an example, that does not quite apply to my situation, because I use an entity collection as follows:
adapter.FetchEntityCollection(salesOrders, bucket);
Where adapter is my dataAccessAdapter and salesOrder is entitycollection<SalesOrderHeaderEntity>.
I appreciate your help.
Weera,