Hello,
I've found the following LINQ example at Scottgu's blog (http://weblogs.asp.net/scottgu/archive/2008/01/07/dynamic-linq-part-1-using-the-linq-dynamic-query-library.aspx):
Dim Northwind As New NorthwindDataContext
Dim query = Northwind.Products _
.Where("CategoryId=2 AND UnitPrice>3") _
.OrderBy("SupplierId")
Gridview1.Datasource = query
Gridview1.DataBind()
Now I've got the following query:
var q = (
from p in MetaData.VwInternetArtikelenTocelo
select p
);
After this I want to add an extra where clause like this:
q.Where("FoodProducts=1");
This gives me the next exception:
Error 3 The type arguments for method 'System.Linq.Queryable.Where<TSource>(System.Linq.IQueryable<TSource>, System.Linq.Expressions.Expression<System.Func<TSource,bool>>)' cannot be inferred from the usage. Try specifying the type arguments explicitly. C:\SVN\Tocelo\Tocelo.UmbracoExtensions\Tocelo.BusinessLogic\BLL\Controllers\ProductsController.cs 73 13 Tocelo.BusinessLogic
It looks like I can only add a predicate, but I want to add an string expression. Is this possible using Linq to LLBLGen Pro?