LINQ doesn't work

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
michael.p.larsen
Lieutenant (LT)
Lieutenant (LT)
Posts: 70
Joined: Fri Jan 15, 2010 8:17 am

LINQ doesn't work

Post by michael.p.larsen » Tue Mar 16, 2010 10:23 am

I can't get LINQ to work. I tried adding references, but still no go.
I'm using AbleCommerce version 7.0.4 build 13424.

Any ideas?

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: LINQ doesn't work

Post by mazhar » Tue Mar 16, 2010 10:26 am

What error/exception or some detailed information is been shown by that custom page?

michael.p.larsen
Lieutenant (LT)
Lieutenant (LT)
Posts: 70
Joined: Fri Jan 15, 2010 8:17 am

Re: LINQ doesn't work

Post by michael.p.larsen » Tue Mar 16, 2010 10:31 am

I tried adding:
using System.Linq;

but it's just not recognizing my LINQ expressions... I have:

Code: Select all

GridView1.DataSource = 
from city in cities
where city.Length > 4
orderby city
select city.ToUpper();
It just says I'm missing a ";"


I tried putting it all in line and also ( )... but no go.

michael.p.larsen
Lieutenant (LT)
Lieutenant (LT)
Posts: 70
Joined: Fri Jan 15, 2010 8:17 am

Re: LINQ doesn't work

Post by michael.p.larsen » Tue Mar 16, 2010 10:35 am

Wait, it looks like it may have worked.

I had to add an old reference,
using System.Query;

and it looks like it works.

michael.p.larsen
Lieutenant (LT)
Lieutenant (LT)
Posts: 70
Joined: Fri Jan 15, 2010 8:17 am

Re: LINQ doesn't work

Post by michael.p.larsen » Tue Mar 16, 2010 10:38 am

I downloaded the CTP example (http://www.microsoft.com/downloads/deta ... laylang=en) and stole the DLLs from the example, added it to the project, and it worked. Interesting

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: LINQ doesn't work

Post by mazhar » Tue Mar 16, 2010 10:59 am

Personally I haven't tried LINQ in AbleCommerce anywhere but I don't see any problem of making it work in AbleCommerce. Hopefully you will be able to get your changes done without running into any AbleCommerce + LINQ compliance issue.

michael.p.larsen
Lieutenant (LT)
Lieutenant (LT)
Posts: 70
Joined: Fri Jan 15, 2010 8:17 am

Re: LINQ doesn't work

Post by michael.p.larsen » Tue Mar 16, 2010 11:05 am

Hopefully not!!

joea84
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 27
Joined: Wed May 26, 2010 11:55 am

Re: LINQ doesn't work

Post by joea84 » Fri Mar 04, 2011 11:10 am

Hi,

My business sells an AbleCommerce Linq compatible product list control, so you can use LINQ to query products. Most of the queries are already pre-packaged; newest products, products by keyword, featured products, products by vendor and etc. Here is a link:

http://www.ablesf.com/AbleSF-4-AbleComm ... n-P77.aspx

The tool is open source and there are no license keys.

Joseph Anderson
President, JMA Web Technologies
Owner, AbleCommerce Marketplace
info@jmawebtechnologies.com
http://www.jmawebtechnologies.com

Post Reply